W3C home > Mailing lists > Public > www-validator@w3.org > March 2011

(unknown charset) Re: <meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1">

From: (unknown charset) Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Wed, 30 Mar 2011 03:44:21 +0200
To: (unknown charset) Glynn Williams <glynn@wowdesignsolutions.com>
Cc: (unknown charset) "Jukka K. Korpela" <jkorpela@cs.tut.fi>, www-validator@w3.org, chaa006@gmail.com
Message-ID: <20110330034421114269.a22bfb58@xn--mlform-iua.no>
There is a way in which you can - currently at least 
(http://www.w3.org/Bugs/Public/show_bug.cgi?id=12072)  - be valid even 
if you use that element. The trick is to place the <meta> element 
before the DOCTYPE, like this:

<!--[if IE]>
<!DOCTYPE html>
<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1"> 
<![endif]-->
<!DOCTYPE html>
<html> 

etc. Note that you must place a DOCTYPE inside the conditional 
statement, or else IE will believe that there is something illegal 
before the DOCTYPE, and go into quirks mode.

Also note that this may impact on how IE identifies itself to scripts 
that relies on sniffing the user agent.

Leif Halvard Silli

Glynn Williams, Tue, 29 Mar 2011 15:33:20 +0100:
> Thanks Jukka
> I try to always get a clean validation, but as you say it doesn't 
> mean the website is poorly constructed, both HTML and CSS. I'm happy 
> to live with this single main error.
> Thanks both for your help in this matter. Have a good day.
> Kindest regards
> Glynn
> 
> T: 0115 9525 637
> M: 0794 1183 257
> E: glynn@wowdesignsolutions.com
> W: www.wowdesignsolutions.com
> This e-mail transmission and any documents, files or attachments may 
> contain information that is confidential or legally privileged. If 
> you are not the intended recipient or person responsible for 
> delivering this transmission to the intended recipient, you should 
> return this email unread to WOW Design Solutions. Any disclosure, 
> copying, printing or distribution or use of this transmission is 
> strictly prohibited. If you have received this transmission in error, 
> please notify the sender by telephone or e-mail and delete the 
> original transmission along with any attachments without reading or 
> saving in any form. Internet communications are not always secure and 
> therefore WOW Design Solutions does not accept legal responsibility 
> for this message. Any views or opinions in the content of this 
> specific transmission do not necessarily represent those of WOW 
> Design Solutions.
>  Please consider the environment before printing this e-mail.
> 
> 
> Jukka K. Korpela wrote:
>> Philip Taylor (Webmaster, Ret'd) wrote: 
>> 
>>> Glynn Williams wrote: 
>>> 
>>>> This statement is valid, but shows non-valid for HTML5: 
>>>> 
>>>> <meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1"> 
>>> 
>>> What are you using as the definition of "valid", Glynn ? 
>> 
>> Apparently Glynn is worried about the report of the W3C Markup 
>> Validator. The validator is correct in this issue, as the current 
>> HTML5 drafts define a limited set of allowed values for http-equiv, 
>> not including the one needed here. 
>> 
>> The tag is used to make IE behave the best it can, in "standards" 
>> mode, and if the author knows what he is doing (the page is designed 
>> to work in that mode), the tag is useful, due to IE 9's annoying 
>> features. 
>> 
>> Validation is a tool, not an end, and there is no merit in getting a 
>> "clean" "validation" report from an experimental, poorly documented 
>> heuristic checker (which is what W3C Validator is in HTML5 mode), 
>> checking against an unknown version of some work in progess (which 
>> is what HTML5 is). It's a very useful tool if you wish to author in 
>> HTML5 style - but there's no point in trying to please it in matters 
>> like this. 
>> 
Received on Wednesday, 30 March 2011 01:44:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:46 GMT