强制IE9进入浏览器兼容性视图 [英] Force IE9 into browser compatibility view
问题描述
我知道如何强制IE在文档兼容性中查看页面,但浏览器兼容性视图如何?
我有一个项目只有在IE9处于浏览器兼容性视图中时出于各种原因,但我无法找到任何有关如何强制IE9这样做的资源。
每个人只会谈论强制文档的兼容性,例如使用
< meta http-equiv =X-UA-Compatiblecontent =IE = 8/>
但是这在我的情况下不起作用,因为它只设置文档视图即可。是否有设置浏览器视图的方法?
PS:为了清楚起见,这是我需要强制执行的设置:
浏览器兼容性http://img513.imageshack。 us / img513 / 8589 / browsercomp.png
请参阅 MSDN文档。
因为兼容性,您应该使用emulateIE7模式是 IE7:
< meta http-equiv =X-UA兼容content =IE = EmulateIE7>
编辑
如果以上方法无效,其他选项 穷人。
从上面的链接引用:
除非您准备直接联系Microsoft以将您的网站添加到全球黑名单中,否则没有太多可以做的事情(除非您想将您的网站封装在源于黑名单域的框架中)。
I am aware of how to force IE into viewing a page in document compatibility, but what about browser compatibility view?
I have a project that only works when IE9 is in browser compatibility view for various reasons, yet I can't find any resources on how to force IE9 to do so.
Everyone only talks about forcing the document compatibility, e.g. using
<meta http-equiv="X-UA-Compatible" content="IE=8" />
But that doesn't work in my case, because it only sets the document view. Is there a way to set the browser view, too?
PS: To make it abundantly clear, this is the setting I need to enforce:
Browser Compatibility http://img513.imageshack.us/img513/8589/browsercomp.png
See MSDN documentation.
You should use emulateIE7 since compatibility mode is kind of IE7:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
Edit
If the above does not work, the other options are really poor.
Quoting from the link above:
- Microsoft has not placed the domain name of the site on a blacklist. (blacklist linked in original article is very old and not being updated, you can find a local copy on your computer)
- An intranet admin has not placed the site on a blacklist.
- The user has not pressed the Compatibility View button (duh)
- The site is not in the intranet zone
- The page is not framed by a Compatibility Mode page.
The above are, AFAIK, the only causes for compatibility mode.
Unless you are prepared to contact Microsoft directly to have your website added to the global blacklist, there isn't much you can do (unless you want to wrap your site in a frame that originates from a blacklisted domain).
这篇关于强制IE9进入浏览器兼容性视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!