IE8 – Force a web document to be rendered in compatibility mode
As everyone knows by now, we in the Web developpement buisness know have to deal with a new browser, namely Internet Explorer 8. However, this can be a bit of a pain to maintain – and, in some case, debug – code of old websites which are now only in maintenance and not part of an active developpement cycle.
However, our friends at Microsoft have implemented a nice feature in their new browser: compatibility mode. Although I do like the other new features a lot (such as native JSON object support, :before and :afterb CSS tags and such), some websites are just not worth debugging, and you’d rather just have it display like it does under IE7.
Here is a small piece of HTML which will force your website to be displayed in compatibility mode under IE8:
<meta http-equiv="X-UA-Compatible" content="IE=7">;
Make sure to test your site afterward, since IE8 compatibility mode rendering is not exactly the same. Alternativiely, you could set IE=8 to make sure your website is displayed correctly under IE8 (i.e., to override the default preferences).
