Skip navigation

Q. I'm creating a web page and want it to be rendered using the Internet Explorer (IE) 8/IE 9 compatibility mode. How can I tell the browser to use compatibility mode from within my web page?

A. The compatibility mode in IE 8 and IE 9 allows websites that don't display correctly in the native IE 8/IE 9 rendering mode to be rendered using the IE7 engine. You can manually set a site to use compatibility mode, but sites can also be coded to automatically tell the browser to use compatibility mode. Adding the following to the metadata of the web page source:

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

(Place the <meta … /> part in your existing <head /> section.)

If you want an entire site to render using compatibility mode, add a custom HTTP header to your site:

X-UA-Compatible: IE=EmulateIE7

This method saves you from having to tag every page.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish