Re: X-UA-Compatible causes extraneous errors in the validator for an html5 page

On Wed, Apr 11, 2012 at 7:47 PM, Robert K. Foster
<rkfoster@thewindjammer.com> wrote:
> I learned this from another developer and was not sure why the meta tag was necessary.
> Is this in order to make the html code that immediately follows it be seen by other
> IE browsers.

No.

> Here's the code:
>
> <meta http-equiv="X-UA-Compatible" content="IE=9" />

See http://msdn.microsoft.com/en-us/library/ie/cc288325(v=vs.85).aspx
for a description of what this code does.

One of the things that should do is force IE 10 to behave like IE 9 -
probably not what you want.

> <!--[if lt IE 9]>
> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
> <![endif]-->

See

http://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx

and

https://code.google.com/p/html5shiv/

for descriptions of what this code does.

(In short, you can drop the meta tag and use a real HTTP header
specifying IE=edge.)

--
Benjamin Hawkes-Lewis

Received on Thursday, 12 April 2012 10:36:25 UTC