Difference between IE8 & EmulateIE8

☆樱花仙子☆ 提交于 2019-12-06 23:15:48

问题


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"?


回答1:


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.



来源:https://stackoverflow.com/questions/22987260/difference-between-ie8-emulateie8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!