internet-explorer - Internet Explorer 8 EmulateIE7 模式不起作用

标签 internet-explorer iis iis-6 internet-explorer-8

我已经设置了 IIS6 来发送以下 header

自定义标题名称 : X-UA-兼容
自定义标题值 : IE=EmulateIE7

应该强制 IE 8 进入 IE 7 兼容模式。您可以在 MSDN 上阅读更多相关信息。 .

我通过查看开发人员工具栏注意到,如果我定义了 DTD,文档模式将正​​确设置为 IE 7,但浏览器模式为 IE 8。如果页面没有 DTD,文档模式将设置为 Quirks和浏览器模式再次 IE 8。

难道我做错了什么。如何强制 IE 8 设置 IE 7 浏览器模式。

谢谢

最佳答案

我已经使用这个元标记来强制 IE7 模式:

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

重要提示:您必须将此放在 <head> 中的任何其他标签之前!

(实际上你可能可以在这之前放一个 <title>,但不放任何东西比特定情况更容易记住)

关于internet-explorer - Internet Explorer 8 EmulateIE7 模式不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/981219/

相关文章:

ruby-on-rails - Microsoft Edge PDF 内联问题

windows - 此站点无法提供安全连接 – ERR_SSL_PROTOCOL_ERROR

asp.net - "Could not load file or assembly ' X.dll ' or one of its dependencies. The specified module could not be found."- 在主机服务器上

c# - 在 IIS 6 中托管 .NET 4.0 Web 服务

asp.net - 长时间运行的 HttpWebRequest

asp.net - 捕获 IIS 级别的错误以在 ASP.NET 中处理

css - DIV在IE中随机切断

IE中CSS布局问题(附图片及代码)

HTML5 不在 IE 中呈现 header 标签

node.js - 使用 iisnode 时保护 CookieSession