简体   繁体   English

Edge是否应避免使用HTML元标记?

[英]Should HTML meta tags be avoided for Edge?

When one of our users tries to open our site in Edge, it instead opens in IE. 当我们的用户之一尝试在Edge中打开我们的网站时,它将在IE中打开。 I understand there are some settings on their machine that may trigger this based on my research (group policies, intranet sites, compatibility modes, etc.) 我了解他们的计算机上有一些设置可能会根据我的研究触发此设置(组策略,Intranet站点,兼容性模式等)

In looking, I found this MS page https://docs.microsoft.com/en-us/microsoft-edge/deploy/emie-to-improve-compatibility 在外观上,我发现了该MS页面https://docs.microsoft.com/zh-cn/microsoft-edge/deploy/emie-to-improve-compatibility

It says that "You must continue using IE11 if web apps use... <meta> tags". 它说:“如果Web应用程序使用... <meta>标签,则必须继续使用IE11”。 I don't know if this means that any and all <meta> tags will trigger the "open it in IE" behavior, or if they're just recommending it. 我不知道这是否意味着任何<meta>标签都会触发“在IE中打开”行为,或者是否只是建议这样做。

I also thought things like <meta charset="UTF-8" /> were highly important. 我还认为<meta charset="UTF-8" />的东西非常重要。 We also use a <meta> tag to indicate viewport dimensions/scaling/etc. 我们还使用<meta>标签指示视口尺寸/缩放比例等。

Should I avoid all <meta> tags? 我应该避免使用所有<meta>标签吗? Or just <meta http-equiv="X-UA-Compatible" content="IE=edge"> ? 或者只是<meta http-equiv="X-UA-Compatible" content="IE=edge"> I need to prevent the site from kicking over to IE from my end of things without relying on whatever the user has done to their settings (if possible). 我需要阻止网站从结束时转移到IE,而不要依赖用户对其设置所做的任何操作(如果可能)。

I would like to know if your website is intranet site, if so, since Edge has a group policy ​which opens all the intranet sites in IE, you could try the following steps: 我想知道您的网站是否是Intranet站点,如果是这样,由于Edge具有可在IE中打开所有Intranet站点的组策略,您可以尝试以下步骤:

  1. Open Local Group Policy Editor. 打开本地组策略编辑器。
  2. Select "Administrative Templates". 选择“管理模板”。
  3. Select "Windows Components". 选择“ Windows组件”。
  4. Select "Microsoft Edge". 选择“ Microsoft Edge”。 Once you double click "Microsoft edge" you will see different settings & their current state. 双击“ Microsoft edge”后,您将看到不同的设置及其当前状态。
  5. Select "Send all intranet sites to Internet Explorer 11" and then "Disabled" it. 选择“将所有Intranet站点发送到Internet Explorer 11”,然后“禁用”它。
  6. Quit Edge & re-start (if required you might re-start your PC as well). 退出Edge并重新启动(如果需要,您也可以重新启动PC)。

在此处输入图片说明

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM