There’s been a lot of discussion over Internet Explorer 8’s handling of web standards. The main concern is whether or not version 8 should support web standards out of the box, or default to IE7’s less strict web standards behavior. Microsoft has gone as far as to make a decision to support IE7’s less strict web standards by default, only to announce that they were wrong and launched IE8 Beta in strict standards mode.
Articles regarding the issue:
First you’ll have to determine what authors mean when they say “web standards”. Are we talking simply about any version of HTML that validates, in addition to valid CSS? The discussions I’ve read don’t say, specifically, so I can only assume that’s what they mean. What they do all seem to agree on is that if I create CSS that takes advantage of improper CSS rendering for any version of Internet Explorer, those will now render properly in an web standards compliant IE8; making them useless. This I can understand.
For quite some time now we’ve been dealing with IE6, and a future that includes IE6 will require IE6 specific CSS to make things look right. So we continue doing what we need to do, easy enough. But how many of you have been hacking things specifically for IE7, in the short time it’s been available? My guess is not many. Like me, there might be a couple declarations you overwrite for IE7 in an IE only stylesheet, but surely nothing that will keep your site from functioning properly. This results in a stylesheet that every single version of IE reads, but is really filled with IE6 only hacks.
If you do this and test in a browser that already passes the Acid 2 test (Opera 9, Safari 3), as IE8 will, then you shouldn’t have many problems.
Example of adding a stylesheet that all versions of IE will use in your HTML doc:
<!--[if IE]>
<link rel="stylesheet" type="text/css" media="all" href="exploder.css" />
< ![endif]-->
In exploder.css put your hacks for both IE6 and IE7:
/* IE 7 & UP HACKS: */
.foo {padding-left: 7px;}
/* IE 6 ONLY HACKS: */
* .foo {padding-left: 14px;}
Since IE7 came out, the idea was to only hack for IE6, after all, what other browsers really need that much help?
When you hear “web standards” do you think about Javascript? Me either.
What I’m really missing in all of the talk about IE8 breaking sites is why these sites are actually breaking. Surely it’s not some silly CSS that was written specifically for IE7 that makes google maps and gmail fail, as the articles have lead me to believe. I’ve not seen other changes in IE 8 discussed, although I imagine they’ve occurred. Such as updates to the DOM and Javascript engine.
In gmail, the only modifications based on the users browser that I can see, are used in Javascript. Same goes for google maps.
When these articles refer to “web standards” are they including Javascript for some reason? When they mention that “sites have little hacks in them that only apply to IE” do they mean these hacks are more than just CSS hacks? Because if all the problems were related to “little CSS hacks that only apply to IE” then all this commotion would be a bit much, and the problems would be something any decent designer could handle; no?
Cross-browser Javascript really is much more of a mess than CSS is. I find that nearly 95% of my CSS works perfectly fine on IE7 and am pretty happy with the results overall. Mind you, that is with well-written CSS and proper semantic HTML. Like you said, it’s just IE6 that needs a bit of an extra push (or two), but it’s fine to handle that with the '* html' hack, which all other browsers ignore - as they should.
I think it’s a bit different with Javascript. It is those tiny changes to the DOM handling that are disastrous to AJAX apps like GMail and GMaps. Especially because all Google’s JS was written by themselves and deals with all the tiny inconsistencies between browsers that obviously break when IE8 comes along.
There’s nothing to worry about for all of us spoiled with jQuery or Prototype. When IE8 comes out, so will a new version of those libraries and suddenly the internet will appear not to have changed too much at all.
Mmmm, internet, how do you always stay so comfy and fluffy?
Thanks Foxxyz
This is what I suspected, and yet all the coverage seems to blame all the IE8 issues on web standards. The web is way deeper than it’s presentation!