Can you have multiple http-equiv meta properties?
I don't really understand what it does, but it is set in my project to:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
I want to force compatibility mode in IE8 off, cos people keep turning it on and it breaks stuff. It's software used on the intranet where everyone has IE8.
I read that I should put this in:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
to force it off. However, should I replace the first line wit开发者_JS百科h this one, have both, or do something else entirely?
Just put those two lines in the head, don't combine them.
You can have as many meta http-equiv tags as you want.
The sames goes for normal meta tags.
Yes, don´t worry. You may have multiple http-equiv lines. In fact, on this case what you are doing is setting 2 different variables:
Content-Type = "text/html; charset=iso-8859-1"
X-UA-Compatible = "IE=EmulateIE8"
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />
In my pages I am setting my X-UA-Compatible as:
<meta http-equiv=\"X-UA-Compatible\" content=\"IE=100\" >
I think IE=100 has the same effect as IE=EmulatesIE8
put the X-UA-Compatible tag at the top of the head section of your document as it needs to be here. Content-type is telling the browser what the document content is and should be placed after t.
精彩评论