gpt4 book ai didi

internet-explorer-8 - 即使 IE=EmulateIE7 也启用 IE8 兼容性 View 按钮

转载 作者:行者123 更新时间:2023-12-04 00:14:42 24 4
gpt4 key购买 nike

对于我们的 Web 应用程序,我们为所有页面发送 X-UA-Compatible -> IE=EmulateIE7。但是,刷新按钮旁边的兼容性 View 按钮仍会显示。

1)这是预期的行为吗?
2) HTTP header 不应该强制浏览器以 IE7 模式显示(启用 Quirks + IE7Standards),然后显示兼容性 View 按钮?

如果站点没有准备好 IE8,有没有办法强制 IE7 模拟,从而禁用此按钮?

最佳答案

根据 Just The Facts: Recap of Compatibility View,您已经通过使用版本控制标记声明 [您的网站]“准备好”用于 Internet Explorer 8。不应显示兼容性 View 按钮:

Site owners are always in control of their content. By default, Internet Explorer uses DOCTYPE switching to determine Quirks v. Standards mode (again, Standards mode maps to IE8 Standards by default). Site owners can choose to use the X-UA-Compatible tag to be absolutely declarative about how they’d like their site to display and to map Standards mode pages to IE7 Standards. Use of the X-UA-Compatible tag overrides Compatibility View on the client.

Sometimes the Compatibility View button isn’t displayed. The button is located on the address bar next to the ‘stop’ and ‘refresh’ buttons. There are a few cases where there’s no action for a user take and, thus, the Compatibility View button will not show:

  • If you're viewing an internal-to-Internet Explorer page (such as about:InPrivate)
  • If you're viewing a page that has declared it's "ready" for Internet Explorer 8 through use of the versioning tag / HTTP header (it doesn’t matter if this tag triggers Quirks, IE7 Standards, or IE8 Standards, the button won’t be displayed)
  • If you're viewing an intranet page and you have the ‘Display intranet sites in Compatibility View’ checkbox selected
  • If you're viewing any webpage and you have the ‘Display all websites in Compatibility View’ checkbox selected
  • If you're viewing a webpage that is included on the Microsoft-supplied compatibility view updates list and you have the ‘Include updated website lists from Microsoft’ checkbox selected
  • If you've toggled either the ‘Document Mode’ or ‘Browser Mode’ settings via the Developer Toolbar

如果您使用的是 HTTP header ,您是否使用 Fiddler 来验证 X-UA-Compatible header 实际上是在每个页面上传递的?
如果您使用的是 META 标签,那么根据 META Tags and Locking in Future Compatibility :

The X-UA-compatible header is not case sensitive; however, it must appear in the Web page's header (the HEAD section) before all other elements, except for the TITLE element and other META elements.


最后,当按钮出现时,IE8 是否真的在兼容性 View 中?如果是这样,则您的网站可能在 Microsoft 的 IE8 兼容性列表中,或者在本地客户端配置中:
  • Tools > Compatibility View Settings
  • 确保您的网站未列在您添加到兼容性 View 的网站下
  • 尝试取消选中包括 Microsoft 更新的网站列表并重新启动浏览器
  • 关于internet-explorer-8 - 即使 IE=EmulateIE7 也启用 IE8 兼容性 View 按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/897409/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com