Html 当引用 IE=edge,chrome=1 时,X-UA-Compatible 是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14637943/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is X-UA-Compatible when it references IE=edge,chrome=1?
提问by sergserg
I just saw this meta tag in the wild and was wondering it does and why it's used?
我刚刚在野外看到了这个元标记,想知道它确实存在以及为什么使用它?
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
Reading the documentationon About.com, it says:
阅读About.com 上的文档,它说:
"IE=edge" tells Internet Explorer to use the highest mode available to that version of IE. Internet Explorer 8 can support up to IE8 modes, IE9 can support IE9 modes and so on.
“IE=edge”告诉 Internet Explorer 使用该版本 IE 可用的最高模式。Internet Explorer 8 最多可以支持IE8 模式,IE9 可以支持IE9 模式等等。
But what about the chrome=1
tag?
但是chrome=1
标签呢?
采纳答案by Bosworth99
It's for Google's Chrome Framebrowser add-on.
它适用于 Google 的Chrome Frame浏览器插件。
ChromeFrame can be installed on various versions of IE (especially handy for older versions that don't play nicely with modern web features). It essentially runs the chrome browser insideof IE.
ChromeFrame 可以安装在各种版本的 IE 上(对于不能很好地与现代网络功能配合使用的旧版本尤其方便)。它本质上是在IE内部运行 chrome 浏览器。
In the case of the meta tag, IE should run in standards mode (most current edition "Edge") - and activate chrome frames if it exists.
在元标记的情况下,IE 应在标准模式(最新版本“Edge”)下运行 - 并激活 chrome 框架(如果存在)。
I usually do some conditional browser stuff for older versions of IE, allowing the user to install the add-on as an option.
我通常为旧版本的 IE 做一些条件浏览器的东西,允许用户安装附加组件作为选项。
More here : chrome frame API
更多信息: chrome frame API
(Keep in mind that Google Chrome Frame is no longer supported)
(请记住,不再支持 Google Chrome Frame)
回答by Doug Rohrer
Also, starting in IE11 "edge" mode, which used to be experimental, is now the "preferred" mode - see Compatibility changes in IE11 Preview
此外,从 IE11“边缘”模式开始,以前是实验性的,现在是“首选”模式 - 请参阅IE11 预览版中的兼容性更改
Additionally, "document modes" are generally being deprecated in IE11 all together, so you should probably try to stop depending on them.
此外,“文档模式”通常在 IE11 中一起被弃用,因此您可能应该尝试停止依赖它们。