Disable compatibility view mode for site in IE8
- Published:
To prevent user from switching to compatibility view mode when viewing your webpage in IE8 (this mode is often accidentally enabled by users — due to “good” placing of the appropriate button
), when IE8 operates almost identically to IE7 (e.g., does not support display: table), use X-UA-Compatible meta element (or server response header of the same name) with IE=edge value:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
Unlike IE=8 value, IE=edge value forces IE to use most modern operation-mode regardless of current version of the browser. So, for example, IE9 will not be forced to operate in IE8 mode.