Why IE8 is in IE7 mode. Variable “IE” == 7

前端 未结 3 1507
深忆病人
深忆病人 2021-01-21 06:46

I have the header in my HTML page like this below and I open this site in IE8. When I look at it in \"Web Developer\" the \"if IE 7\" is active. WebBrowser set BrowserMode on \"

3条回答
  •  余生分开走
    2021-01-21 07:15

    Others have recommended using X-UA-Compatible IE=8, but note that this will force IE to run in IE8 mode, even if the user has IE9 (or later). This is generally not what you're going to want.

    Better to specify that IE should use the latest rendering engine available to it. For that, you use the same meta tag, but use IE=edge as the value, instead of IE=8.

    
    


    Note that IE has a configuration panel which allows you to specify when it will use compatibility mode. For some reason, the default for this is to use compatibility mode for "sites in the local intranet".

    This is the most common reason for IE jumping into compatibility mode unexpectedly when you're developing a site, as your localhost server will be treated as being "in the local intranet".

    You can change this setting easily enough by going to the "Tools" menu, and picking the "Compatibility View Settings" option.

提交回复
热议问题