开发者

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> Where it should be place in <head>to render doucment as IE7 properly in IE8?

开发者 https://www.devze.com 2022-12-18 21:35 出处:网络
<meta http-equiv=\"X-UA-Compatible\" content=\"IE=EmulateIE7\" /> Where it should be开发者_C百科 place in <head> to render document as IE7 properly in IE8?Seeing as this meta tag changes t

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> Where it should be开发者_C百科 place in <head> to render document as IE7 properly in IE8?


Seeing as this meta tag changes the way the document is rendered, and could cause visual changes, I would apply the same rule as that for the content-type header, which is as early in the <head> as possible.

From the W3C encoding specs:

The META declaration must only be used when the character encoding is organized such that ASCII-valued bytes stand for ASCII characters (at least until the META element is parsed). META declarations should appear as early as possible in the HEAD element.


In the document's head, where the other meta tags are, after <meta http-equiv="content-type" ...>.


Anywhere within the <head> element.

You can also send it directly as an HTTP header if you choose to. For a complete site it may make sense just to configure the server to send out this additional header than touching each and every file.

0

精彩评论

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