Navigating the changing IE landscape

Now that the IE 9 beta is available, people have started popping up on some of the stats of a few of the websites I maintain, and this is proving to be just as troublesome as just about every other new release of IE. The thing I noticed right off the bat, in fact it was impossible to miss, is that a site running a DHTML menu throws JavaScript errors like they were free, but only in IE 9, and only if it is not in compatibility mode. So, rather than monkey about in some damn fugly JavaScript, I opted to just set the site to force IE to render in compatibility mode.

There are a couple of ways to do this, the most basic is to drop a meta tag in the head:

<meta http-equiv="X-UA-Compatible" content="IE=7" />
or
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

This way would have been laborious and quite tedious going through all of the pages in the site and making sure the ones that are not content managed have this new tag. Meh – so not doing that.

The way I opted for was to simply add it as a custom header in IIS (thanks to Joel Varty for the nudge), and be done with it. It’s pretty simple, just open up the IIS snap-in, right click on your site and open properties. Select the HTTP Headers tab, click add then enter “X-UA-Compatible” in the custom header name field, and “IE=7” or “IE=EmulateIE7” in the custom header value field. I used the IE=EmulateIE7 value because it seems to be the most flexible, and doesn’t absolutely force IE7 rendering, especially for pages using Quirks mode.

Pretty simple: now it’s all fine for even the most cutting edge of IE users.

 

Don’t forget the life size images of Inori either.

You’re welcome.

%d bloggers like this: