Force "Internet Explorer 8" browser mode in intranet

HtmlInternet Explorer-8Ie8 Compatibility-ModeX Ua-CompatibleIe8 Browser-Mode

Html Problem Overview


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.

Html Solutions


Solution 1 - Html

Seem that MSFT has not consider a large intranet environment that we have many different web application running inside.

There is no way to bypass the IE8 setting, according to somewhere I read on MSDN forum.

So, I will have to beg my system administrators to put some new group policies to change "Compatibility View" setting and the value and prevent user change the value, until MSFT discover this bug and fix it.

From an MSDN blog post (emphasis theirs): "Browser Mode is chosen before IE requests web content. This means that sites cannot choose a Browser Mode."

Solution 2 - Html

It is possible to override the compatibility mode in intranet. Just add the below code to the web.config. Worked for me with IE9.

<system.webServer>
<httpProtocol>
  <customHeaders>
    <clear />
    <add name="X-UA-Compatible" value="IE=edge" />
  </customHeaders>
</httpProtocol>

Solution 3 - Html

You'll have to make some adjustments to IE.

Here they are.....

In Internet Options / Local Intranet / Sites

Under : Local Intranet inside Sites, uncheck "Automatically detect intranet network".

Then select only "Include all network paths (UNCs)

See attached screenshots

Screenshot

Solution 4 - Html

I found the answers here hard to follow, so here's the important information in a nutshell:

If your intranet uses default settings for IE, IE7 Standards Mode is enforced for intranet sites regardless of any website settings.

From this:

> Compatibility View and the Enterprise > > A large number of line-of-business > websites are Internet Explorer 7 > capable today. In order to preserve > compatibility, Internet Explorer 8 > ships with smart defaults based on > zone evaluation. In the default state, > all sites on the public internet > display in Internet Explorer 8 > Standards mode (Compatibility View > off) and all intranet websites > display in Internet Explorer 7 > Standards mode (Compatibility View > on). > > Let’s look at some examples. If you > navigate to sites on your local > intranet like http://myPortal and > http://sharepoint/sites/mySite, > Internet Explorer 8 identifies itself with a User Agent string of > ‘7’, Version Vector of ‘7’, and > displays webpages that trigger > standards mode in Internet Explorer 7 > Standards mode. This combination > allows webpages that worked correctly > in Internet Explorer 7 to continue to > do so in IE8.

Solution 5 - Html

To override the Compatibility View settings for intranet or all websites you need to make IE8 emulate itself.

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

Solution 6 - Html

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 an X-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.

Solution 7 - Html

If you are using .NET, I have the answer for you:

HTML:

<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="X-UA-Compatible" content="IE=8" >

Web.Config:

<system.webServer>
	<httpProtocol>
	  <customHeaders>
		<clear />
		<add name="X-UA-Compatible" value="IE=8" />
	  </customHeaders>
	</httpProtocol>

Solution 8 - Html

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".

Solution 9 - Html

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\BrowserEmulation IntranetCompatibilityMode 1-->0

Solution 10 - Html

In order for the META declaration to work, the doctype has to be the simplified version:

<!DOCTYPE html>

Not the longer statement in Dennis' question.

Solution 11 - Html

This combo did the trick for me:

<!DOCTYPE HTML>
<HEAD>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >
</HEAD>

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.

Solution 12 - Html

You need remove port number from your domain site name site:1180/index/

If browser see port number in url - hi "think", that's is intranet.

setup your dns server for friendly urls - site.com/index and it work OK

Solution 13 - Html

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?".

<!DOCTYPE HTML>
<HEAD>
    <meta http-equiv="X-UA-Compatible" content="Edge" >
</HEAD>

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDennis CView Question on Stackoverflow
Solution 1 - HtmlDennis CView Answer on Stackoverflow
Solution 2 - HtmlAndras CsehiView Answer on Stackoverflow
Solution 3 - HtmlCodex73View Answer on Stackoverflow
Solution 4 - HtmlupshakeView Answer on Stackoverflow
Solution 5 - HtmlCraig AView Answer on Stackoverflow
Solution 6 - HtmlDavid KolarView Answer on Stackoverflow
Solution 7 - HtmlFrancisco GoldensteinView Answer on Stackoverflow
Solution 8 - Htmlbrunosp86View Answer on Stackoverflow
Solution 9 - HtmlYurokView Answer on Stackoverflow
Solution 10 - HtmlDeborahView Answer on Stackoverflow
Solution 11 - HtmlRay BrockmanView Answer on Stackoverflow
Solution 12 - HtmlZOXEXIVOView Answer on Stackoverflow
Solution 13 - HtmlTiaView Answer on Stackoverflow