Last updated on August 9th, 2022 at 09:10 am

IE compatibility view force Internet Explorer to use Internet Explorer 7 rendering mode.My website was having issues in the way it was displaying in Internet Explorer 8, only compatibility view was working fine. So to automatically render my website in compatibility mode rather than asking visitors to do so is the right approach

Using htaccess (Apache)

All you need to do is add this line on your .htaccess file.

Header set X-UA-Compatible IE=EmulateIE7

Or if you need Apache to set this header only for IE 8 browsers then add the below lines in .htaccess file.

BrowserMatch "^.*MSIE 8.*$" emulate_ie7
<Location *>
   Header set X-UA-Compatible "IE=EmulateIE7" env=emulate_ie7
</Location>

Using Meta Tag (HTML)

If you don’t want to touch .htaccess or running on a different web server like Nginx, try updating this tag on your website code to force Internet Explorer compatibility mode

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

Microsoft documentation has a list of options you can use for the X-UA-Compatible meta tag. Check this out

Leave a Reply

Your email address will not be published. Required fields are marked *