如何在IE11兼容模式下强制运行浏览器IE 11? [英] How to forcefully run the browser IE 11 in IE11 Compatiblity Mode?

查看:1244
本文介绍了如何在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?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆