HowTo: Make IE8 Display Your Website in IE7 Compatibility Mode

Authored by Calvin Freitas and posted on Monday, March 16th, 2009 at 9:58 pm

To make your website or web page look the same in Internet Explorer 8 as it does in Internet Explorer 7, include the following line in the <head> tag on your page.

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

This code tells IE8 to render the page in IE7 compatibility mode. That way you can just worry about making your site work in IE6 and IE7 and not trying to support three concurrent generations of the web browser.

Microsoft has more information about Compatibility View for IE8 on the IEBlog.

You can also tell IE8 to apply compatibility mode by setting the header in your web server. In Apache, you can do this by including the following line in your site config file (or apply it just to a specific directory or page if needed). Make sure you have the Headers module installed.

Header set X-UA-Compatible "IE=EmulateIE7"

More information is available in the Internet Explorer Compatibility Center.

(Thanks to @kevmoo (Kevin Moore) for initially answering my question about this topic.)

Comments are closed.

 
%d bloggers like this: