I’m actually pleased with the news that MS is pushing Internet Explorer 8 (IE 8) as an automatic update.

Have you been using or testing your sites in IE 8 yet? If not, you need to be! The numbers aren’t that high yet, but I bet they will –thankfully– be increasing rapidly.

Why thankfully? Well, mainly because IE 8 supports (almost) all of the CSS2.1 specification. For full details check out quirksmode’s CSS Compatibility Chart. This means, in theory, that a single set of CSS can be written and –drum roll please– it will render correctly in IE 8.

Wait! Wait! Wait! Stop the dancing…

…what about that little button there? Yes that one, right there, the “Compatibility Button”! Holy Toggle Switch Batman, why would I want to render a site in IE 7 ‘mode’ in IE 8?

Well, for one thing, not every site is well maintained and it may be a while before people get around to updating their code to work in IE 8. This toggle switch may make your site more palatable to new IE 8 users.

Why do they need to update their code, you ask? There are several ways, that we won’t get into here, to get older versions of IE to render ‘correctly’ – meaning: look the same as more compliant browsers. These ‘hacks’ or work-arounds will make IE 8 render incorrectly. Hopefully, your work-around of choice has been to use conditional comments to deliver separate CSS files to IE 7 or older. I have been for a while, so I’m really not able to speak to how to un-hack or add-a-hack your CSS if you’ve been using other methods.

If you have been using conditional comments, simply updating your conditional statements to exclude IE 8 from receiving the custom IE CSS takes only a few seconds. Something like this will do:

< !--[if lte IE 7]-->

Now, to prevent people from using that little IE 7 Toggle Switch and potentially setting your site to always render as IE 7 (and not just for them), add this bit to your document head:

< equiv="X-UA-Compatible" content="IE=8">

This should fix you right up, assuming you’re coding valid HTML and CSS to start with. You’ll still have to deal with IE 6 & 7 for a little bit longer unfortunately, but the light is at the end of the tunnel now.

–“And now,” cried Max, “let the wild rumpus start!” *

Posted in Browsers, Compatibility, CSS.

One Response to IE 8 is fast upon us – NOW WHAT!?

  1. Steven says:

    In a recent post on Ajaxian and a quick look at Browser Market Share sheds some sad light on the IE upgrade trend. Apparently, the rise of IE 8 market share is coming from IE 7's market share and not IE 6 as one would hope. It would seem that those users on IE 6 are stuck there for one reason or another. This makes me sad.