10

1 . open IE8
2 . press F12
3 . load msdn.com

you should see

msdn doctype and compatibility mode

4 . open a new tab and load this site you should see

preview doctype and compatibility mode

Please tell me what on the second page triggers the IE8 Compat View IE7 Standards

On the page in question, we do NOT set the X-UA-Compatible meta tag (yet, we are thinking of setting it to EDGE) and we are not sending X-UA-Compatible in the header.

I do not know where in my browser I could set this, I do know that of the three testing this, ONE does not have the issue and the other two do.

mplungjan
  • 169,008
  • 28
  • 173
  • 236

1 Answers1

16

There are three things which can cause a page to open in IE7 mode:

  1. Browser configuration. This may be an issue particularly for sites on ones local intranet.

  2. The X-UA-Compatible meta tag.

  3. An X-UA-Compatible HTTP header.

The browser configuration issue can be overridden by either of the X-UA-Compatible variants.

If you are sure it's not your browser config, and you can't see a relevant <meta> tag in the code, then it may be that the X-UA-Compatible setting is being served as an HTTP header and is being specific in telling the browser to go into IE7 mode.

There's nothing wrong with serving an X-UA-Compatible setting, but it is more common to set a higher version of IE than a lower one; the lower setting would normally only be used to explicitly downgrade the browser for really old sites.

The browser configuration can be problematic because even if you switch it off on your machine, you can never be sure how other users have their browsers configured. For this reason, it is good practice to serve X-UA-Compatible either as a meta tag or an HTTP header in most cases.

Spudley
  • 166,037
  • 39
  • 233
  • 307
  • Thanks - I know of #2 and #3 and that is not the case (see update) where would I find a setting that would switch this setting to IE7 on this page, and switch it back on msdn's (and other) site(s) ? – mplungjan Oct 11 '11 at 13:10
  • 1
    IE8 -> Tools menu -> Compatibility View Settings. – Spudley Oct 11 '11 at 13:12
  • 7
    particularly note the "view intranet sites in compatibility mode" setting; in most installations, this defaults to being switched on, and it catches lots of people out. – Spudley Oct 11 '11 at 13:22
  • Yep. That was it. Thanks. Made me feel very foolish. At least we had two different settings, I had all _my_ sites on and he had _all_ sites in compatibility mode. Interesting that msdn still was in IE8 mode regardless of that setting - their X-UA IE9 setting must have overridden our setting – mplungjan Oct 11 '11 at 13:29