Tech Hacks

How to force Internet Explorer to view a page in a specific version mode.

Internet Explorer 7 (Photo credit: Wikipedia)

Meta tags can be used to force Internet Explorer(IE) browser to use a specific standards mode. The X-UA-Compatible meta tag tells IE what view mode to use to render the current page.

Here is how to emulate different browser modes using meta tags:

Emulate IE 7:

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

Emulate IE 8:

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

Emulate IE 9:

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

If the end client visits the page on a browser that is older than the specifed view mode (eg. User has IE 8 but view mode forces IE 9), the browser will ignore the meta tag and render the page the best way it can.