Set IE7 Compatibility Flag for IE8 in IIS May 11, 2009Posted by codinglifestyle in IIS.
Now that IE8 has officially been pushed out via Windows Update it’s time to get serious about testing your web site compatibility. As you probably know, one of the big changes in IE8 is complying to standards for increased interoperability. In other words, Microsoft won’t be going it’s own way with standards anymore. Out of the box, IE8 complies with standards that many pages developed with IE6 or IE7 in mind won’t adhere to. This means customers may have serious layout and style issues when their customers start browsing with IE8.
There is a meta flag that can be set set to tell IE8 to automatically switch to compatiblity view, which will render the page the same as IE7. This is fine if you have a masterpage, but in an older app with many pages this is not ideal. Luckily, there is a dead easy way of setting a custom HTTP header which will tell IE8 the same thing.
- Open iismgr
- Open website properties
- Click HTTP Headers tab
- Click Add
- For customer header name enter X-UA-Compatible
- For custom header value enter IE=EmulateIE7
- Click OK
Done! From now on IE8 browsers will default to compatibility mode and won’t even offer the user the option of viewing the side with compatibility mode off.