views:

1132

answers:

4

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

A: 

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.

Joey
A: 

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

RegDwight
+2  A: 

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.

Pekka
what is the benefit to put content-type as earlt as possible?
metal-gear-solid
The content-type determines how the characters in the web site are rendered. If the server does not send a content-type header, the browser has to rely on the `<meta>` tag. So it could be that it has to switch encodings to the value specified by the meta tag *while it is already rendering the page*. If the meta tag is built in late, it could be that the switch in encodings becomes visible to the user's eye.
Pekka
how can i know my server is content-type header or not andi f my server is sending then should i not use <mtea> again?
metal-gear-solid
Check the headers your server sends, for example using Firebug or the Web Developer Toolbar.
Pekka
and in site's view source " <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />" is also there.
metal-gear-solid
and server header has "Content-Type: text/html; charset=utf-8"
metal-gear-solid
The server header will do, but the meta tag won't hurt (as long as it's identical with what's in the header).
Pekka
but is there any type of benefit to keep in <head> also ? not confirm buti think w3c validation will give error if <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> will not be present in document.
metal-gear-solid
A: 

Good to know that. seo updates

debt