开发者

X-UA-Compatible working in developer tools

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

This is a very cool piece of code that forces Chromeframe or latest rendering engine. It can even be sent throught the http headers if you want the html to validate. But with this comes a doubt for me. I use IE8 in compatibility mode to test my websites for IE7 (either clicking the "sheet-of-paper" icon next to the URL box, or by activating "browsing mode" in developer tools). So my question is:

Does compatibility mode still renders webpages as IE7, or does the X-UA instruction blocks my intention?

Im worrying that I think ive checked my pages in IE7 and it turns 开发者_如何学JAVAout what im seeing it's not really what a native IE7 would show....

Thanks for your comments.


Anything you do in developer tools overrides the headers and meta tags. Here's a flowchart which explains it all:

X-UA-Compatible working in developer tools


If IE7 compatibility is really important to you, don't use IE7 mode in IE8/9/10 to test it. Use a virtual machine with a native IE7. IE7 mode in IE8/9/10 doesn't behaves exactly the same as a native IE7. What you worry about is true even if Chrome frame isn't installed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜