IE8和IE8之间的区别EmulateIE8 [英] Difference between IE8 & EmulateIE8

查看:450
本文介绍了IE8和IE8之间的区别EmulateIE8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在标头的顶部添加了兼容模式元标记,强制浏览器以IE8模式呈现。
它正在与IE10& IE11但IE9不支持。

 < meta http-equiv =X-UA兼容content =IE = IE8 /> 

任何人都可以解释我在这里做错了吗?我应该使用content =IE = EmulateIE8而不是content =IE = IE8吗? 解析方案

Carpetsmoker www.sblog.in 提供,我最终得到了广泛的答案,并通过更多的资源得到了改进。这是我发现的:



IE8 Beta2 有一种新的方式可以让你的网站兼容。这种方式被称为 IE = EmulateIE7 (它也支持更新的浏览器,就像您的问题一样)。



提供相同的链接:


IE = 7 :以IE7标准模式显示。

IE = EmulateIE7 :显示标准
IE7标准模式下的DOCTYPE;在怪癖
模式下显示古怪的DOCTYPE。

所以基本上当你指定版本如 IE = 8 你明确表示该页面需要使用浏览器使用的最高级标准,而不是完全呈现它的方式。



另一方面,如果您指定 IE = EmulateIE8 ,浏览器将决定是否使用版本标准或怪癖模式进行渲染。因此,如果 IE8 使用它的怪癖模式呈现 www.example.com IE11 接收 IE = EmulateIE8 会做出相同的选择。



方式使您的网页向后兼容使用始终emulate 版本。



我发现这个非常有用的图表展示了 IE 用于确定它使用的女巫文档模式,并且您可以看到决策更改的位置,因为仿真标签的版本。



PS



我不会粘贴图片直接在这里,因为它太大,不适合这个Q& A的宽度。


I added a compatibility mode meta tag at the top of the header to force the browser to render in IE8 mode. It is working with IE10 & IE11 but not with IE9.

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

Can any one explain what I am doing wrong here? Should I use content="IE=EmulateIE8" instead of content="IE=IE8"?

解决方案

Well, following the links provided by Carpetsmoker and www.sblog.in I end up with a broad answer and improved with more sources. This is what I found:

Starting with the IE8 Beta2 there is a new way to make you site compatible. This way is know as IE=EmulateIE7 (It supports newer browser too like in your question).

In the same link was provided this:

IE=7: Display in IE7 Standards mode.

IE=EmulateIE7: Display standards DOCTYPEs in IE7 Standards mode; Display quirks DOCTYPEs in Quirks mode.

So basically when you are specifying the version like IE=8 you are make it clear that the page needs to use the most advanced standards that browser use to have and not exactly the wayt it would render.

In the other way if you specify IE=EmulateIE8 the browser will make a decision if it will render with the version standards or with quirks mode. So if IE8 use to render www.example.com with its quirks mode, IE11 receiving IE=EmulateIE8 will make the same choice.

In the compatibility perspective the proper way to make a page backward compatible you choose use the Emulate version always.

I've found this very useful chart demonstrating the path IE uses to determine witch Document Mode it uses and you can see where the decisions change because the Emulate version of the tag.

P.S.

I won't paste the image directly here because it too large to fits in this Q&A width.

这篇关于IE8和IE8之间的区别EmulateIE8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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