对于内嵌了 Internet Explorer 控件的应用程序,有两种方式可以决定默认的 IE 渲染模式(IE版本)。


一、在页面中指定

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

IE= 后面的值可选项为:7,8,9,10,11/Edge


二、通过以下注册表设置来确定默认的 IE 渲染模式(IE版本)。

一般设置为 11001 (0x2AF9),即 Internet Explorer 11 Edge 模式。

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION]
"mshta.exe"=dword:00002af9


如果页面中有 X-UA-Compatible,则以页面设置为准。

如果页面中没有 X-UA-Compatible,则以注册表设置为准(注意64位模式下,注册表路径中没有 Wow6432Node)。


参考资料:

X-UA-Compatibility Meta Tag and HTTP Response Header

https://docs.microsoft.com/en-us/openspecs/ie_standards/ms-iedoco/380e2488-f5eb-4457-a07a-0cb1b6e4b4b5


Internet Feature Controls

https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330730(v=vs.85)?redirectedfrom=MSDN



本文链接地址: Internet Explorer 控件及 mshta.exe 的 渲染模式(IE版本)
https://blog.qingfengju.com/index.asp?id=446

分类:Web开发 查看次数:923 发布时间:2021/12/9 23:04:09