I noticed most of the web developers and designers hate IE compatible view. The reason is that in there general coding practice and cross browser testing they do not give preference and forgot to test their webpage outputs in IE compatibility view and when at the end of project delivery it clicks in their mind, it get too late and brings lots of burden to rectify the UI compatibility issues.

Here I am sharing a best solution for them, as with the help of http-equiv="X-UA-Compatible" Meta Tag you can easily control that what browser version your page will render in. And along with that you can hide the compatibility view button on IE.

Please note: - by default your pages will get rendered in IE5 (Quirks) mode until and unless you specified the <!DOCTYPE> in your HTML head section

Handling IE Compatibility Mode using Meta Tag

<meta http-equiv="X-UA-Compatible" content="IE=5" />
This will forces IE  to render the page in “Quirks” mode.

<meta http-equiv="X-UA-Compatible" content="IE=7" />
This will forces IE  to render the page using IE 7 Strict mode.

<meta http-equiv="X-UA-Compatible" content="IE=7" />
This will forces IE  to render the page using IE 8 Strict mode.

hide compatibility view button using meta tag

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
IE 7 standards or Quirks rendering, depending on DOCTYPE . Along with this will hide the compatibility view button of browser

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
IE 8 standards or Quirks rendering, depending on DOCTYPE. Along with this will hide the compatibility view button of browser

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
IE 9 standards or Quirks rendering, depending on DOCTYPE. Along with this will hide the compatibility view button of browser

Related posts:


  • jay

    thanks buddy

  • param

    This helps. Thanks.