0

IE has a Browser Mode and Document Mode and I can only seem to set the Document Mode programatically by adding this:

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

This sets Document Mode correctly for me, but I need the Browser Mode to change to Compatibility View. My site only works with these two settings this way. I've tried changing the DocType and other meta settings but nothing seems to work. I've also confirmed my IE settings under Tools->Compatibility Settings have all 3 check-boxes unchecked and nothing in the listbox.

My website is ASP.NET 2.0 running on IIS6 (Windows 2003 Server).

enter image description here

Here is a simple sample site that demonstrates this. Open this in IE10 and then look at the developer tools (F12):

<html>
    <head>
        <title>This is the title</title>
        <meta http-equiv="X-UA-Compatible" content="IE=5" />
        <script type="text/jscript" language="jscript">
            function foo() {
                alert("document.documentMode: " + document.documentMode + 
                    "\n\rdocument.compatMode: " + document.compatMode +
                    "\n\rnavigator.userAgent: " + navigator.userAgent);
            }
        </script>
    </head>
    <body onload="javascript:foo();">
        This is a test site
    </body>
</html>
Dave
  • 281
  • 4
  • 10

1 Answers1

0

First, requisite chiding: if this is your site, you should fix it to work with modern standards.

That said, you're likely accessing this site in such a way that it is loaded in the Intranet Zone, and you said that you've disabled the option to display intranet sites in compatibility view in compatibility view settings. (I believe it is enabled by default.)

Intranet Zone settings override your page's settings, so you have to re-enable that option.

Community
  • 1
  • 1
josh3736
  • 139,160
  • 33
  • 216
  • 263
  • I expected the chiding and almost posted the answer to this in the question. Yes, it's the website of the company i work for. We have been rebuilding the (large) site for almost 2 years and it will be ready around July. As a result, we can't make any major changes to the old site (nor do we want to), but are starting to get calls every since IE10 came out, so we're looking for a simple short term fix. – Dave Apr 26 '13 at 20:42