Reputation: 8739
I've set up IIS6 to send the following headers
Custom Header Name: X-UA-Compatible
Custom Header Value: IE=EmulateIE7
that supposed to force IE 8 into IE 7 Compatibility mode. You can read more about it on MSDN .
I have noticed by looking in the Developer toolbar that if I have a DTD defined the document mode correctly gets set to IE 7, but the browser mode is IE 8. If the page doesn't have a DTD the document mode gets set to Quirks and Browser Mode once again IE 8.
Am I doing something wrong. How do I force IE 8 to set IE 7 Browser mode.
Thanks
Upvotes: 4
Views: 11212
Reputation: 9
<!-- Use IE7 mode added on 13th October for IE8 BSCI-->
<!-- <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> -->
<!-- Use IE7 mode added on 20th October for IE8 BSCI-->
<meta http-equiv="X-UA-Compatible" content="IE=IE7" /> <!--- This appears to work on testing! -->
<!-- END -->
Using 'Emulate' did not work but IE=IE7 did
Upvotes: 0
Reputation: 4461
If you followed that guide too closely you will miss the fact that the web.config way of fixing this is only supported in IIS 7 +.
Via [MSDN] article link in OP
Configuring Web Servers to Specify Default Compatibility Modes
Site administrators can configure their sites to default to a specific document compatibility mode by defining a custom header for the site. The specific process depends on your Web server. For example, the following web.config file enables Microsoft Internet Information Services (IIS) to define a custom header that automatically renders all pages in IE7 mode.
BUT see: IIS.NET article
IIS 7.0 The <customHeaders> element of the <httpProtocol> element was introduced in IIS 7.0.
Upvotes: 0
Reputation: 57075
Browser Mode refers to the user-agent header sent by the browser. Since the UA has already been sent before the HTTP response comes back containing your EmulateIE7 directive, it's too late to change the browser mode; only the document mode is changed.
See http://msdn.microsoft.com/en-us/library/dd565628(VS.85).aspx#bdmodes
Upvotes: 4
Reputation: 126
found this solution... hope it works!
Notice: You will have to put the "header" line before any html is sent to the browser (http://www.php.net/header)
It's PHP code, the line should be like this:
header('X-UA-Compatible: IE=7');
Upvotes: 0
Reputation: 4171
Check this link
http://ilia.ws/archives/196-IE8-X-UA-Compatible-Rant.html
Need to add a custom header as described in the link. Still looking for a non header solution when using the transitional DTD.
Upvotes: 1
Reputation: 21161
I think that's working as designed. I've been using that header value with no problems.
Are you having rendering issues on your pages? You could try using IE=IE7 instead.
Upvotes: 0
Reputation: 43243
I've used this meta tag to force the IE7 mode:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
Important: you must put this before any other tags in <head>
!
(actually you might be able to put a <title>
before this, but not putting anything is easier to remember than the specific cases)
Upvotes: 6