简体   繁体   中英

X-UA-Compatible - Including EDGE and IE9?

<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />

In the above declaration, would IE 10 be forced to render in IE9? I'm not sure what the EDGE would do as it's at the end of the list?

Ian

It renders in IE10 mode. You can check that by including it in a document and opening the F12 tools to see what mode it renders in (shown in the top bar of the tool), or include a script that checks. Eg with this document https://dl.dropboxusercontent.com/u/444684/tests/X-UA-Compatibletest.html it returns 10.

Looking at the following documentation , it looks like your meta is actually invalid. There they separate modes by a comma and don't repeat the IE token, eg <meta http-equiv="X-UA-Compatible" content="IE=7,9,10" > . It also mentions the highest supported mode will be used, so if you include edge, it will always be edge. In that case you don't get any benefit of using the additional modes, as they'll never be used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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