简体   繁体   English

IE8和EmulateIE8之间的区别

[英]Difference between IE8 & EmulateIE8

I added a compatibility mode meta tag at the top of the header to force the browser to render in IE8 mode. 我在标头顶部添加了兼容模式元标记,以强制浏览器以IE8模式呈现。 It is working with IE10 & IE11 but not with IE9. 它适用于IE10和IE11,但不适用于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"? 我应该使用content =“ IE = EmulateIE8”而不是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. 好吧,按照Carpetsmokerwww.sblog.in提供的链接,我最终得到了一个广泛的答案,并获得了更多资源。 This is what I found: 这是我发现的:

Starting with the IE8 Beta2 there is a new way to make you site compatible. IE8 Beta2开始,有一种使您的网站兼容的新方法。 This way is know as IE=EmulateIE7 (It supports newer browser too like in your question). 这种方式称为IE=EmulateIE7 (它也支持新的浏览器,就像您的问题一样)。

In the same link was provided this: 在同一链接中提供了以下内容:

IE=7 : Display in IE7 Standards mode. IE = 7 :以IE7标准模式显示。

IE=EmulateIE7 : Display standards DOCTYPEs in IE7 Standards mode; IE = EmulateIE7 :在IE7标准模式下显示标准DOCTYPE; Display quirks DOCTYPEs in Quirks mode. 在“怪癖”模式下显示怪癖DOCTYPE。

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. 因此,基本上,当您指定IE=8类的版本时,您会清楚地表明页面需要使用浏览器使用的最高级标准,而不完全是其呈现的方式。

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. IE=EmulateIE8 ,如果您指定IE=EmulateIE8则浏览器将决定是否使用版本标准或古怪模式进行渲染。 So if IE8 use to render www.example.com with its quirks mode, IE11 receiving IE=EmulateIE8 will make the same choice. 因此,如果IE8使用其怪癖模式呈现www.example.com ,则接收IE=EmulateIE8 IE11将做出相同的选择。

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. 我发现这个非常有用的图表演示了IE用于确定其使用的女巫Document Mode的路径,并且您可以看到决策在哪里更改,因为该标签的仿真版本。

PS 聚苯乙烯

I won't paste the image directly here because it too large to fits in this Q&A width. 我不会在此处直接粘贴图像,因为它太大而无法适合此问答宽度。

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

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