There are "Internet Explorer 8", "Internet Explorer 8 Compatibility Mode", and IE7 mode in IE8.
However, the default setting in IE make all intranet website use "IE8 Compatibility Mode" even I have setted doctype, the meta tag, http header as suggested to force it into IE8 mode.
I have
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
and
<meta http-equiv="X-UA-Compatible" content="IE=8" >
But it still goes into "IE8 Compatibility Mode", without any changes in IE setting.
How to force it into pure "IE8" mode, without change any browser's setting?
PS. I am not talking "document mode" here.
Read somewhere that the DOCTYPE declaration must be the very first line. No comments of any kind, nor empty lines.
In combination with setting the HTTP Response Headers, this worked for me.
Browser Mode
went from "IE9 Compatibility Mode" to just "IE9 Mode".This combo did the trick for me:
at least IE developer tools reports IE9 Compat View, IE8 standards
just for kicks i tried EmulateIE7 and that worked as well. simplifying the extended !DOCTYPE was key.
If you are using .NET, I have the answer for you:
HTML:
Web.Config:
Set a custom HTTP header instead of using the
<meta...
in the<head>
section. These are supposed to be equivalent, but I have seen that anX-UA-Compatible
HTTP header from the server will override IE 8's "Display intranet sites in Compatibility View" setting, where the<meta...
element would not.To override the Compatibility View settings for intranet or all websites you need to make IE8 emulate itself.
The answer marked as "correct" is technically correct but suggests that there is no solution to the real issue being faced by most people that is: "how do I properly show on IE8, with compatibility mode enabled, a web application which does not support compatibility mode?".
this worked for me on several workstations.
If the above code is implemented on application side, IE8 appears to behave as if it was not in compatibility mode, even though it will still show browser mode as compatibility mode.