强制浏览器和文档模式为IE9在IE10 [英] Force Browser and Document Mode to ie9 in ie10

查看:940
本文介绍了强制浏览器和文档模式为IE9在IE10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这code:

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

似乎只能改变文件IE9,而不是浏览器。比打F12和手动更改它的其他任何想法?

seems to only change document to ie9 and not browser. Any ideas other than hitting F12 and changing it manually?

推荐答案

一个网站不能设置浏览器模式。浏览器从网站请求内容之前选择浏览器模式。这指定了浏览器是如何确定的部位,如在UA串

A site can not set the Browser mode. The browser mode is chosen before the browser requests content from the site. This specifies how the browser is identified to the site, such as the UA string.

至于你提到的文档模式可以由作者通过包括X-UA-兼容meta元素设置,或者通过使用DOCTYPE。这将覆盖默认的浏览器该浏览器模式下设置。

As you mentioned, the Document mode can be set by the author by including a X-UA-Compatible meta element, or by the DOCTYPE used. This overrides the default set by the browser for that browser mode.

更改浏览器模式仅适用于使用IE来测试IE浏览器的早期版本将处理该网站是有用的。您可以通过F12换刀它改变它在本地计算机上(但不包括该网站作为一个整体)。

Changing the Browser Mode is only useful for using IE to test how an earlier version of IE would handle the site. You can change it on your local machine (but not for the site as a whole) by changing it in the F12 tool.

用户(因此开发者)可以通过点击URL字段的兼容性视图图标更改浏览器模式。这也将是唯一的那台机器,而不是为所有用户。

The user (and thus developer) can change the Browser mode by clicking on the Compatibility View icon in the URL field. This will also be only for that machine, and not for all users.

在全球范围内改变浏览器模式的唯一方法是让网站添加到MSCOMPAT查看列表。但你不希望出现这种情况,除非该网站使用一吨旧的MS供应商特定的code,并且将不会被更新。

The only way to change the Browser mode globally is to get the site added to MS’ Compat View List. But you don’t want that unless the site uses a ton of old MS vendor specific code, and will not be updated.

您可以阅读更多的<一个href=\"http://blogs.msdn.com/b/ie/archive/2010/10/19/testing-sites-with-browser-mode-vs-doc-mode.aspx\">http://blogs.msdn.com/b/ie/archive/2010/10/19/testing-sites-with-browser-mode-vs-doc-mode.aspx

这篇关于强制浏览器和文档模式为IE9在IE10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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