internet-explorer - meta http-equiv ="X-UA-Compatible"content ="IE=edge"对非IE浏览器有影响吗?

标签 internet-explorer x-ua-compatible

我要加<meta http-equiv="X-UA-Compatible" content="IE=edge">在我的html页面中,以便它可以使用可用的最高模式,如果用户在非IE浏览器中浏览此页面,例如firefox或chrome,此行代码对firefox或chrome有影响吗?

最佳答案

I want to add in my html page, so that it can use the highest mode available.



这是个好主意。一般来说,IE 无论如何都应该使用它的最佳模式,但偶尔(例如,由于用户的浏览器配置)它可能会默认为兼容模式,如果您的页面不是为它设计的,这不是很好。因此,将此标签放入您的页面是一种缓解这种情况的好方法。

Does meta http-equiv=“X-UA-Compatible” content=“IE=edge” impact on non-IE explorer?



不,它没有。该标签特定于 IE,被其他浏览器忽略。

它的设计方式可以被其他浏览器使用,但它从来没有。我见过一些较旧的例子,人们建议为其他浏览器指定版本号,但这样做永远不会有任何效果。

除了 IE=whatever 之外的唯一选项有效的是 chrome=1 .但即使这样也只能被 IE 使用。它由 Chrome Frame plugin 使用, 强制页面在 IE 中使用 Chrome 渲染引擎。但请注意,Chrome Frame 现在已弃用,因此您也不应该再使用它。

所以总结一下:是的,继续将元标记添加到您的代码中,不要担心它会影响其他浏览器。

关于internet-explorer - meta http-equiv ="X-UA-Compatible"content ="IE=edge"对非IE浏览器有影响吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19784822/

相关文章:

html - 忽略 IE9 中内部 iframe 中的 EmulateIE8

html - 在 IE10 iframe 中强制 IE8 仿真

css - IE 或 Firefox,哪个具有更符合逻辑的 CSS 处理?

css - 背景图像的定位在 IE 8 中有所不同

javascript - IE 中的错误阻止我的 VBA 宏运行

internet-explorer - 为什么还要使用 X-UA 兼容 IE=Edge?

javascript - ShowModalDialog 启动页面时忽略 X-UA-Compatible

java - JSF 的 IE 自动填充问题

internet-explorer - Backbone.js:在 Internet Explorer 中使用 pushstate 实现基于斜杠的 URL 的解决方法