Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shouldn't "X-UA-Compatible IE=edge" header override "Display intranet sites in Compatibility View" in IE10?

I have a simple HTML5 / ASP.NET website that I started testing in IE10 today since it released for Win7.

This is an intranet site within my organization, and I believe awhile back there was a group policy deployed to enable the Display intranet sites in Compatibility View by default.

The thing I noticed today in testing was that even though I am adding an X-UA-Compatible IE=edge HTTP header (via my web.config), the site is showing in IE as:

Browser Mode: IE10 Compat View
Document Mode: Standards

I believe my HTML is actually OK though, because I can simply uncheck the Display intranet sites in Compatibility View setting and when it reloads, it immediately switches to:

Browser Mode: IE10
Document Mode: Standards

So my question is simply, shouldn't the IE=edge header value override the Display intranet sites in Compatibility View setting?

If not, is there any way I can override it?

like image 599
kman Avatar asked Feb 28 '13 05:02

kman


People also ask

How do I display intranet sites in Compatibility View in edge?

Use Compatibility View Settings in Edge: Use Always You'll see the Default browser option on the left-side navigation pane. Click on it. Now, go to the Internet Explorer mode pages. Select the Add button and then write down the website addresses you want to open in the compatibility view.

How do I enable Display intranet sites in Compatibility View?

1. Open Internet Explorer, select the Tools button , and then select Compatibility View settings. 2. Under Add this website, enter the URL of the site you want to add to the list, and then select Add.

Is running in Compatibility View because Display intranet sites in Compatibility View?

These settings can be configured in: Tools > Compatibility View Settings > "Display intranet sites in Compatibility View" -checkbox. Tools > Internet Options > Security -tab > Local intranet > Sites -button. Under popup there are checkboxes to configure the automatic resolution.

What is content ie edge in HTML?

IE=edge means IE should use the latest (edge) version of its rendering engine. chrome=1 means IE should use the Chrome rendering engine if installed.


3 Answers

(I'll put this here because this question ranked higher for my google search, but after more digging I actually found the answer on another SO question: https://stackoverflow.com/a/13287226/1563. I'm not sure if they should be merged (at least not without some question editing))

This is likely happening because IE is set to "Display intranet sites in Compatibility View" (Alt+T | Compatibility View settings)

You can't override this setting using the X-UA-Compatible meta tag but you can by sending the X-UA-Compatible http header:

X-UA-Compatible: IE=edge 

Credit goes to Lavinski for finding this

like image 90
danseagrave Avatar answered Sep 22 '22 14:09

danseagrave


This worked for me, try clearing existing headers before adding the new one or any others.

<httpProtocol>
    <customHeaders>
        <clear />
        <add name="X-UA-Compatible" value="IE=Edge" />
    </customHeaders>
</httpProtocol>
like image 25
Tony Avatar answered Sep 22 '22 14:09

Tony


I believe X-UA-Compatible forces document mode while "Compatibility View" turns on both IE7 browser and document mode -> the document mode was actually overridden by X-UA-Compatible.

See Difference between "Browser Mode" and "Document Mode" in Internet Explorer

like image 27
duri Avatar answered Sep 21 '22 14:09

duri