在IE中使用浏览器模式的标签强制IE兼容模式关闭 [英] Force IE compatibility mode off in IE using tags for browser mode

查看:828
本文介绍了在IE中使用浏览器模式的标签强制IE兼容模式关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用html5与angularJs使用follwoing标记



这导致浏览器模式设置为IE8 Compat,并将文档模式设置为IE8 Standards。

 <!doctype html> 

< meta http-equiv =X-UA-Compatiblecontent =IE = 8/>

这会导致浏览器模式=IE8兼容和文档模式=IE8标准 p>

我该如何强制IE Document Mode = IE8 Standards,所以我的东西才会开始工作

解决你需要 IE = edge ,它会强制浏览器使用它的最新版本(IE8将充当IE8,而不是兼容模式)并删除兼容模式的按钮。这会给AngularJS带来最好的结果

 < meta http-equiv =X-UA-Compatiblecontent =IE = edge/> 

另外,如果您在本地运行该站点,IE将会启用并强制兼容模式。您可以在IE中更改此设置,转至工具 - >兼容性视图设置 - >取消选中在兼容性视图中显示Intranet站点。




I am using html5 with angularJs using follwoing tag

This results in Browser mode set to IE8 Compat, and Document mode set to IE8 Standards.

 <!doctype html>
 <html xmlns:ng="http://angularjs.org" id="ng-app"  ng-app="myApp">

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

This results in Browser mode="IE8 Compat" and Document mode="IE8 Standards".

How can i force for the IE Document Mode=IE8 Standards too, so my stuff will start working

解决方案

You want IE=edge, it will force the browser to use the latest version it has (IE8 will act as IE8, not compatibility mode) and removes the button for compatibility mode. This will give the best results for AngularJS

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

Also, if you are running the site locally, IE will pick up on that and force compatibility mode on. You can change this setting in IE, go to Tools –> Compatibility ViewSettings -> Uncheck "Display intranet sites in Compatibility View".

这篇关于在IE中使用浏览器模式的标签强制IE兼容模式关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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