简体   繁体   English

使用 IE=edge,chrome=1 是否仍然有效?

[英]Is it still valid to use IE=edge,chrome=1?

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:我阅读了上个月关闭的 Chrome Frame,因此我试图了解 X-UA 标签的含义,经过 3 小时的研究我仍然没有找到我正在寻找的答案,我的问题如下:

Is it still valid nowdays to use IE=edge,chrome=1 or should I stop at IE-edge from now on?现在使用 IE=edge,chrome=1 是否仍然有效,或者我应该从现在开始停在 IE-edge 上? Or what would be the best pratice to do regarding X-UA, should it be avoided?或者关于 X-UA 最好的做法是什么,应该避免吗?

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> serves two purposes. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />两个目的。

  1. IE=edge : specifies that IE should run in the highest mode available to that version of IE as opposed to a compatability mode; IE=edge :指定IE应该以该版本的IE可用的最高模式运行,而不是兼容模式; IE8 can support up to IE8 modes, IE9 can support up to IE9 modes, and so on. IE8最多可以支持IE8模式,IE9最多可以支持IE9模式,等等。
  2. chrome=1 : specifies that Google Chrome frame should start if the user has it installed chrome=1 :指定如果用户安装了Google Chrome框架,则应该启动它

The IE=edge flag is still relevant for IE versions 10 and below. IE=edge标志仍然与IE 10及以下版本相关。 IE11 sets this mode as the default. IE11将此模式设置为默认模式。

As for the chrome flag, you can leave it if your users still use Chrome Frame. 至于chrome旗帜,如果您的用户仍使用Chrome Frame,您可以将其保留。 Despite support and updates for Chrome Frame ending, one can still install and use the final release . 尽管Chrome Frame的支持和更新已经结束,但仍可以安装和使用 最终版本 If you remove the flag, Chrome Frame will not be activated when installed. 如果删除该标记,则安装时不会激活Chrome Frame。 For other users, chrome=1 will do nothing more than consume a few bytes of bandwidth. 对于其他用户, chrome=1只会占用几个字节的带宽。

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: 注意, W3C验证器会将chrome=1标记为错误:

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.

It's still valid to use IE=edge,chrome=1 . 使用IE = edge,chrome = 1仍然有效

But, since the chrome frame project has been wound down the chrome=1 part is redundant for browsers that don't already have the chrome frame plug in installed. 但是,由于镀铬框架项目已被拆除,因此对于尚未安装镀铬框架插件的浏览器, chrome = 1部件是多余的。

I use the following for correctness nowadays 我现在用以下的正确性

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<head>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>

worked for me, to force IE to "snap out of compatibility mode" (so to speak), BUT that meta statement must appear IMMEDIATELY after the <head> , or it won't work! 为我工作,迫使IE“跳出兼容模式”(可以这么说),但是这个声明必须在<head>之后立即出现,否则它将无效!

please see What does <meta http-equiv="X-UA-Compatible" content="IE=edge"> do?请参阅<meta http-equiv="X-UA-Compatible" content="IE=edge"> 做什么? November 2021 Update by L84 As... 10+ years old, my recommendation would be to leave this tag out altogether, unless you must support old legacy browsers. L84 于 2021 年 11 月更新作为... 10 岁以上,我的建议是完全不使用此标签,除非您必须支持旧的遗留浏览器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IE 8仍在运行兼容模式,即使http-equiv =“ X-UA-Compatible” content =“ IE = edge,chrome = 1” - IE 8 still running compatibility mode even http-equiv=“X-UA-Compatible” content=“IE=edge, chrome=1” 即使IE = edge,兼容模式按钮仍然存在 - Compatibility Mode button still there even with IE=edge Bootstrap Affix无法使用IE,Chrome或MS Edge - Bootstrap Affix not working with IE, Chrome or MS Edge JavaScript 在 Firefox、Chrome 中不起作用 - 在 IE、Edge 中有效 - JavaScript not working in Firefox, Chrome - works in IE, Edge CSS shadow在IE / Edge中有效,而在Chrome或Firefox中不可用 - CSS shadow works in IE/Edge not in Chrome or Firefox Chrome不会拉伸网站图片,而Edge,IE,Firefox则不能 - Chrome stretches website images, Edge, IE, Firefox not @media Query可在IE,Firefox和Edge中使用,但不能在Chrome中使用 - @media Query Working in IE, Firefox, and Edge, but not Chrome 图像对齐方式在IE(边缘)和Google Chrome中已更改 - Image alignment changed in IE (edge) and google Chrome IE边缘可多打印一页,但不能在Chrome中打印 - IE edge print one extra page but not in Chrome 元标记强制使用IE Edge或IE8,但不使用IE9 - Meta tag force to use IE Edge or IE8 but not IE9
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM