如何在IE11兼容模式下强制运行浏览器IE 11?

编程入门 行业动态 更新时间:2024-10-28 09:17:00
本文介绍了如何在IE11兼容模式下强制运行浏览器IE 11?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

How to forcefully run the browser IE 11 in IE11 Compatiblity Mode?

我知道将网站添加到兼容模式手动。但我希望它能做到明智的代码。 我在web.config中试过如下

I know to add the website to compatibility mode manually. But I want it to do code wise. I tried in web.config as below

<system.webServer> <httpProtocol> <customHeaders> <add name="X-UA-Compatible" value="IE=EmulateIE11" /> </customHeaders> </httpProtocol> </system.webServer>

但该网站没有被添加到兼容模式。单击F12时,文档模式显示为Edge(默认)而不是IE 11兼容模式

But the site is not getting added to the compatibility mode. On clicking F12 the document mode is shown simply as Edge(default) and not IE 11 Compatiblity Mode

推荐答案

IE11模式和边缘模式之间没有区别。最新版本的开发人员工具仅提供IE11模式。 There is no difference between "IE11 mode" and "edge mode". The latest version of the developer tools only offer IE11 mode. 指定旧文档模式 [ ^ ]

从IE11开始,考虑边缘模式首选文档模式。 (在早期版本中,它被认为是实验性的。)要了解更多信息,请参阅文档模式已被弃用 [ ^ ]。 ... 从Internet Explorer 11开始,内容值大于10会导致边缘模式,这是最高的用于查看网页的Internet Explorer版本支持的版本。

Starting with IE11, edge mode is considered the preferred document mode. (In earlier versions, it was considered experimental.) To learn more, see Document modes are deprecated[^]. ... Starting with Internet Explorer 11, content values greater than "10" lead to edge mode, which is the highest version supported by the version of Internet Explorer used to view the webpage.

NB:在这种情况下,edge不是指Microsoft Edge,Windows 10替代IE ;它只是意味着当前版本的IE支持的最新文档模式。

NB: In this case, "edge" doesn't refer to Microsoft Edge, the Windows 10 replacement for IE; it just means the latest document mode supported by the current version of IE.

更多推荐

如何在IE11兼容模式下强制运行浏览器IE 11?

本文发布于:2023-11-11 17:02:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1579042.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:浏览器   如何在   模式下

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!