简体   繁体   English

如果已启用IE8,有没有办法禁用兼容模式?

[英]Is there a way to disable compatibility mode in IE8, if already enabled?

I'm "sunsetting" the IE7 support for a web app, and I don't want IE8 users to see an "oops, you are using an old browser" warning. 我正在“取消”对Web应用程序的IE7支持,并且我不希望IE8用户看到“糟糕,您正在使用旧的浏览器”警告。

If an IE8 user has already clicked the compatibility mode button, is there a way for a web page to immediately disable the compatibility mode? 如果IE8用户已经单击了兼容模式按钮,那么网页是否可以立即禁用兼容模式? Setting the X-UA-Compatible header or meta tag doesn't seem to help. 设置X-UA-Compatible标头或meta标签似乎无济于事。

I found an blog post (!) about adding an IEStandards.xml , but even that solution would not have immediate results: the xml file is reportedly polled by IE8 only once every 30 days. 我发现有关添加IEStandards.xml 的博客文章 (!),但是即使该解决方案也不会立即产生结果:据报道,IE8仅每30天对xml文件进行一次轮询。 Another blog post lists the options for a site to be removed from the list, and that does not give me more hope. 另一篇博客文章列出了要从列表中删除网站的选项,但这并没有给我带来更多希望。

(IE9 is different. Even if the user has set the compatiblity mode earlier, it seems to disable it, if given the correct X-UA-Compatible header and/or meta tag. This is documented. ) (IE9是不同的。即使用户之前设置了兼容模式,如果给出了正确的X-UA-Compatible标头和/或meta标记,它似乎也将其禁用

I ended up just detecting the compatibility mode and then nagging the user. 我最终只是检测到兼容模式 ,然后na了用户。 At least Google Plus does this. 至少Google Plus会这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM