IE8浏览器模式与文档模式 [英] IE8 browser mode vs document mode

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

问题描述

有人可以用简单的术语解释IE8 浏览器模式文档模式之间的区别吗?

Can someone please explain the difference between IE8 browser mode and document mode in simple terms?


  • 导致浏览器模式改变的原因是什么?

  • 导致文档模式改变的原因是什么?

  • What causes the browser mode to change?
  • What causes the document mode to change?

如果用户通过开发人员工具更改了模式,即使刷新页面,更改是否仍然存在?

If a user changes the mode(s) via developer tools, does the change remain even if the page is refreshed?

我问这个是因为我们在这里做了一些IE8测试,不同的人有不同的模式组合,我想弄清楚这是怎么回事。

I am asking this because we are doing some IE8 testing here, and different people have different combinations of the modes, and i want to try to figure out how this is happening.

推荐答案

来自这篇文章,名为 IE8如何确定文档模式


  1. 开发人员工具设置会覆盖选项卡中显示的页面的所有文档模式。

  2. 除非X-UA兼容值为EmulateIE7或EmulateIE8,否则X-UA兼容的元标记然后标题覆盖兼容性视图设置和doctype。

  3. 用户的兼容性视图设置会覆盖Microsoft兼容性查看列表。

  4. 如果以上规则均不适用,则doctype将确定网页是否以IE8标准,IE8标准或Quirks模式呈现。

  1. The Developer Tools settings override all Document Modes for pages displayed in a tab.
  2. The X-UA-Compatible meta tag and then header override Compatibility View Settings and the doctype unless the X-UA-Compatible value is EmulateIE7 or EmulateIE8.
  3. The user’s Compatibility View Settings override the Microsoft Compatibility View List.
  4. If none of the above rules apply, the doctype determines whether the webpage renders in IE8 Standards, IE8 Almost Standards or Quirks Mode.

因此我们得到以下问题的答案:

So from that we get the following answers to your questions:

Q。 简单来说,浏览器模式和文档模式有什么区别?

A。在开发人员工具中设置浏览器模式来模拟不同的IE浏览器版本在网页上定义文档模式的行为,告诉IE为了兼容性而不同地呈现网站。

Q. What is the difference between browser mode and document mode in simple terms?
A. Browser mode is set in the developer tools to emulate different IE browser version behaviors while document mode is defined on the web page to tell IE to render the site differently for compatibility purposes.

问。 什么导致浏览器模式更改?

A. 用户更改是开发工具中的浏览器模式。

Q. What causes the browser mode to change?
A. The user changes the browser mode in the dev tools.

问。 导致文档模式更改的原因是什么?

A。由Web开发人员设置的Doctype和X-UA兼容的元标记和标题。

Q. What causes the document mode to change?
A. The Doctype and the X-UA-Compatible meta tag and header set by the web developer.

问。 如果用户通过开发人员工具更改了模式,即使刷新页面,更改是否仍然存在?

A. 浏览器模式将保留,但如果您更改Doctype和X-UA-Compatible,它们将返回到页面上定义的内容。

Q. If a user changes the mode(s) via developer tools, does the change remain even if the page is refreshed?
A. The Browser Mode will stay, but if you change the Doctype and X-UA-Compatible, they will go back to what is defined on the page.

更新:正如Adrien Be指出的那样,IE9 +增加了通过设置更改开发工具中的文档模式的功能,该设置将在刷新时保留。

UPDATE: As Adrien Be points out below, IE9+ adds the ability to change the document mode in the dev tools via a setting which will persist on refresh.

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

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