internet-explorer - 以编程方式从 IE 'internet explorer' 中删除兼容性 View 按钮?

标签 internet-explorer ie8-compatibility-mode

我有一个网站,但我不想在兼容模式下查看。

例如,我必须向客户解释为什么不选择此按钮来查看网站。

enter image description here

我的问题是,如何阻止激活此按钮,或者阻止在兼容模式下查看我的网站?

例如www.facebook.com - 网站上没有兼容性 View 按钮!?

如何为所有具有兼容模式选项的 IE 版本执行此操作?


我试过这个...

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />

但是按钮还在吗?


任何想法都会很棒,谢谢。



它没有验证,我做错了什么吗?

enter image description here

最佳答案

尝试仅使用 IE=edge:

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

将此元标记添加为 <head> 中的第一件事。仅使用其中一个应该会强制用户的浏览器以最新的标准模式呈现。

我没有在内容属性中使用多个,但当 IE 发现它有在旧版本中渲染的选项时,它会显示兼容模式按钮。仅使用一个表明它没有任何选项,应该将其删除。

关于internet-explorer - 以编程方式从 IE 'internet explorer' 中删除兼容性 View 按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11971362/

相关文章:

css - Internet Explorer 不加载外部样式表

javascript - IE 中 window.URL 的替代方案是什么?

jquery - 无法在 Internet Explorer 中将样式表添加到 iframe

JavaScript queryselector 方法在 IE8 中不起作用

css - 全高列和粘性页脚

internet-explorer - 为什么 IE 无法显示 UTF-8 编码的文本?

internet-explorer - Internet Explorer 的径向渐变

html - IE 和 Firefox 中的 CSS 图像缩放

jquery - 为什么我的背景图片在 ie8 中不显示?

c# - Web 浏览器控件忽略 FEATURE_BROWSER_EMULATION reg 条目