What is triggering IE7 standards mode on this page?

后端 未结 1 806
一整个雨季
一整个雨季 2021-02-14 07:52

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

you should see

\"msdn

相关标签:
1条回答
  • 2021-02-14 08:30

    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.

    0 讨论(0)
提交回复
热议问题