IE8 X-UA-Compatible

How to develop for and how to cater to the new IE browser AND keep your old sites sane without too much refactoring

I've read up on some stuff recently regarding IE 8 and the (in)sanity switch they've (Microsoft) built into the browser, the so-called "IE8 X-UA-Compatible". I found some nice articles about it on the Microsoft Internet Explorer blog ( and, but also on MSDN ( The articles show a good recap of what to do and how to approach this new "special need" IE browsers seem to have. Of course there were rants ( but also immensely helpful charts (

And then I found some nice code to use:

  1. The first is a simple meta-tag for a per page control of the compatibility mode: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />. There's a debate on how efficient this is (does it work at all?) but by applying different combinations as stated here, one can try and find the version best suited for ones needs.
  2. The second was a simple piece of PHP to send as a HTTP-header by the webserver: <?php header('X-UA-Compatible: IE=EmulateIE7');?>. This keeps the compatibility switch outside of the HTML and feeds in directly to the browser from the webserver.
  3. Last but not least there's a ColdFusion version of the above as well of course: <cfheader name="X-UA-Compatible" value="IE=EmulateIE7" />

With these things you should be well armed to battle the beast with many dreadful heads, or i.e. IE ;-) Hopefully the newest head to pop up will be the best one yet!

Update 1!

I found a set of really great articles by Faruk Ates, a Dutch guy big in the Internet world. Read his initial story on X-UA-Compatible here and the follow-up here.

Update 2!

While we're at it, here some more info:

Geplaatst op 10 februari 2010 om 11:46 u.

Alles in 'Nieuws'

114 bericht(en)