1

I am building a site that is hosted as an Intranet. I need it to not be in Compatibility View for IE.

Apparently, IE by default is set to always display Intranet sites in Compatibility View mode. I have tried using meta tags, standard xhtml dom but nothing seems to be able to force off Compatibility mode. The only way is to have the user go to Tools/Compatibility View Settings/ and uncheck "Display intranet sites in Compatibility View".

Is there a way to force off Compatibility View in Intranet sites using the server settings?

I have tried:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>TEST</title>
</head>
<body> 
    test
</body>
</html>

and,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TEST</title>
</head>
<body> 
    test
</body>
</html>

and,

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
simple
  • 2,167
  • 6
  • 30
  • 49

2 Answers2

0

Your first example should work. Note however that IE will still send the IE7 User-Agent header to the server, so you should not do server side detection of the IE version. Also when testing, you need to clear the cache and restart the browser when you change the code, as IE will try to remember the last used compatibility view setting for your site instead of reading the X-UA-Compatible value.

0

See Override intranet compatibility mode IE8, which tells you to modify the http headers, rather than specifying meta tags. An example is given on how to do this in an ASP.Net web.config file.

Alternatively, you could specify the custom headers in web server configuration. In IIS 7.5 for instance,

  1. you navigate to the website you want to reconfigure;
  2. look for the entry HTTP Response Headers;
  3. add a setting with Name: "X-UA-Compatible" and Value: "IE=Edge".

If your website is an ASP.Net web application, both methods will replicate to each other. That is, the second method will actually update the web.config file.

Community
  • 1
  • 1
R. Schreurs
  • 6,514
  • 3
  • 35
  • 54