I'm working on a web product that may be hosted as an intranet site. I'm trying to find a programmatic way to keep IE9 from slipping into IE9 Compatibility View browser mode, even though 'Display Intranet sites in Compatibility View' may be on.
I'm testing with this html page:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=9" />
<title>Company</title>
</head>
<body>
</body>
</html>
I've put this in IIS config:
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=edge" />
</customHeaders>
</httpProtocol>
as recommended here: https://stackoverflow.com/a/5887546, and checked the response headers in IE9 and see:
X-UA-Compatible IE=Edge
But the page still puts the browser in Compatibility View browser mode.
The console shows:
HTML1202: http://intranet-site/test.html is running in Compatibility View because 'Display intranet sites in Compatibility View' is checked.
test.html
There's a similar question here: https://stackoverflow.com/a/3726605/1279516, in which a comment by Jacob on the chosen answer suggests that in IE9, there's nothing you can do to override the 'Display Intranet sites in Compatibility View' setting. However, his comment is the only place I've found mention of this. Can anyone confirm or deny that assertion?
And is there anything else I can try? I shouldn't have to tell all clients who deploy our product to uncheck the 'Display intranet sites in Compatibility View' browser setting for all their users.
Unless someone says otherwise, oryol's comment suggests that all features are made available based on Document Mode, so there's no need to try to control browser mode further once you are getting the document mode you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With