问题描述
我上个月阅读了Chrome Frame,因此我试图理解这对X-UA标签意味着什么,经过3个小时的研究,我仍然没有找到我正在寻找的答案,我的问题是如下:
现在使用IE = edge,chrome = 1还是有效的,还是应该从现在开始停止在IE边缘?或者应该避免使用X-UA的最佳实践是什么?
$ b IE =边缘
:指定IE应该以可用于该版本IE的最高模式运行,而不是相容模式; IE8可以支持IE8模式,IE9可以支持IE9模式,等等。
chrome = 1
:指定如果用户安装了Chrome浏览器框架,则应该启动Google Chrome框架
$ b IE = edge
标志对于IE 10或更低版本仍然有效。 IE11将此模式设置为默认值。
至于chrome标志,如果您的用户仍然使用Chrome Frame,则可以将其保留。尽管Chrome Frame结束了支持和更新,但仍可以 。如果您移除该标志,Chrome Frame在安装时将不会被激活。对于其他用户, chrome = 1
只会占用几个字节的带宽。
我建议你分析你的观众,看看他们的浏览器是否禁止任何需要的功能,然后决定。也许最好是鼓励他们使用更现代的浏览器。
请注意,会标记 chrome = 1
作为错误:
错误:具有值为
的http-equiv属性的meta元素-UA兼容必须具有值为IE =边缘的内容属性。
I read Chrome Frame closed last month, I thus tried to understand what it'd mean for the X-UA tag and after 3 hours of research I still didn't find the answer I'm looking for, my question is the following :
Is it still valid nowdays to use IE=edge,chrome=1 or should I stop at IE-edge from now on ? Or what would be the best pratice to do regarding X-UA, should it be avoided ?
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
serves two purposes.
IE=edge
: specifies that IE should run in the highest mode available to that version of IE as opposed to a compatability mode; IE8 can support up to IE8 modes, IE9 can support up to IE9 modes, and so on.chrome=1
: specifies that Google Chrome frame should start if the user has it installed
The IE=edge
flag is still relevant for IE versions 10 and below. IE11 sets this mode as the default.
As for the chrome flag, you can leave it if your users still use Chrome Frame. Despite support and updates for Chrome Frame ending, one can still install and use the final release. If you remove the flag, Chrome Frame will not be activated when installed. For other users, chrome=1
will do nothing more than consume a few bytes of bandwidth.
I recommend you analyze your audience and see if their browsers prohibit any needed features and then decide. Perhaps it might be better to encourage them to use a more modern, evergreen browser.
Note, the W3C validator will flag chrome=1
as an error:
Error: A meta element with an http-equiv attribute whose value is
X-UA-Compatible must have a content attribute with the value IE=edge.
这篇关于使用IE = edge,chrome = 1是否仍然有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!