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

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

问题描述

我使用带有 angularJs 的 html5 使用以下标签

I am using html5 with angularJs using follwoing tag

这导致浏览器模式设置为 IE8 兼容,文档模式设置为 IE8 标准.

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" />

这会导致 Browser mode="IE8 Compat" 和 Document mode="IE8 Standards".

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

我怎样才能强制使用 IE 文档模式=IE8 标准,这样我的东西才能开始工作

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

推荐答案

你想要 IE=edge,它会强制浏览器使用它的最新版本(IE8 将充当 IE8,而不是兼容模式)并删除兼容模式按钮.这将为 AngularJS 提供最好的结果

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" />

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

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天全站免登陆