Issues with IE Compatibility
Be aware of the difference between the Browser Mode vs. Document Mode.
- Browser Mode is controlled by the client browser - is affected primarily by "Compatibility View" settings as well as domain
- Document Mode is controlled by the web server, and/ or the web page
Using IE 8-9, some strange behaviour has been observed.
Enabling Compatibility View (for either intranet, all websites) would result in the following for affected sites:
- IE conditional comments would detect IE7
- User-agent sent would be IE7 (compatible)
- Browser mode would show IE 9 Compatibility View
- Document mode would be IE 7 standard
The above behaviour would not be affected by X-UA-Compatible meta-tags within the page.
However, sending X-UA-Compatible HTTP header would alter the behaviour as follows:
- IE conditional comments would detect IE9
- User-agent sent would be IE7 (compatible)
- Browser mode would show IE 9 Compatibility View
- Document mode would depend on the value of the X-UA-Compatibility (E.g. IE=edge)
In a corporate intranet environment where IE 8-9 is ubiquitous, the recommended practice would be to:
- If there is intention to support IE7: Design and test the site/ application for IE7 up to the latest prevailing IE
- Otherwise: Send the X-UA-Compatible: IE=edge HTTP header so that testers using IE 8-9 would not be affected by browser mode "Compatibility View" - which would have forced the document mode to be IE 7.
- Javascript inspector
- IE9 Compatibility Cookbook
- IE9 Javascript changes
- Preparing website for IE9
- IE9 document modes and Javascript support
- Even Baidu uses DocType to resolve issues!
Comments