What to do if the head tag to make IE8 Emulate IE7 does not work?

What to do if the head tag to make IE8 Emulate IE7 does not work?

Following the advice of the following post, I added the following code to one of my client's websites in .NET.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html>   <head>     <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> 

For some reason the website is still not displaying the menus correctly. If I go into the IE8 menus and add the web URL to always show in Compatibility mode then the site starts working correctly. How should I proceed?

NOTE: This is an old website constructed in 2006-2007. This is not a website under current development.

Change domain when authenticating with IE8


What does this refer to in an onfilterchange attribute?
How should I proceed?.
IE7 spacing within a UL
Figure out what's preventing the menu from working in IE8 and fix it.

Open Barebones IE with Shortcut
It's better to fix the root cause of a problem than to treat its symptoms.

IE7 cause of “Text - Empty Text Node”
The root problem is the menu being broken.

Managing ajax Couchdb calls and IE's (hta) agressive cache
You intend to just cover it up by having IE display it as if it were another browser.

ie associative array initialisation fails
Fix the root cause and this compatibility thing won't be a concern..
IE image width & height = 0 before image downloaded
EDIT:. Anyway, according to this article, the IE=EmulateIE7 meta tag might interpret the page as standards or quirks, depending on the doctype of the page.

Since your doctype is transitional it might be using a mode you don't intend.

What I would do is try the other modes outlined on that page:.
Quirks*            IE=5          IE 5.5 (Quirks) rendering mode IE 7 Standards*    IE=7          IE 7 standards rendering mode IE 7 Emulation     IE=EmulateIE7 IE 7 standards or Quirks rendering, depending on DOCTYPE IE 8 Standards*    IE=8          IE 8 standards rendering mode IE 8 Emulation     IE=EmulateIE8 IE 8 standards or Quirks rendering, depending on DOCTYPE Latest Mode*       IE=edge       Always use the latest standards rendering mode 


Have you tried adding the http header site-wide in IIS?. X-UA-Compatible: IE=EmulateIE7. http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx lists some links on how to do that on different versions of IIS.. However, like Welbog said above, you should instead make this work in IE8.

That header was introduced to make it easier to migrate existings sites to IE8, not for new ones in development..


Have you tried IE=7?.
<meta http-equiv="X-UA-Compatible" content="IE=7" /> 


If the Emulation tag isn't working, there's a very good chance that the page is sending back different data based on the User-Agent string.. The user-agent string sends "7.0" when a site is in the compatibility list, but sends "8.0" when the site uses the META tag (because the request has already been sent by the time the server asks for IE7 mode).. You can use Fiddler (www.fiddler2.com) to troubleshoot this, or try the User-Agent picker addon (http://www.enhanceie.com/ietoys/uapick.asp).

84 out of 100 based on 54 user ratings 654 reviews