Grow your CSS skills. Land your dream job.

X-UA-Compatible – Do I need it?

  • # February 2, 2012 at 11:19 am

    I’m a bit confused about the X-UA-Compatible entry in the <head>. Several sources recommend this, but I’m not sure if it does anything valuable, nor what the downside is.

    I think its purpose is to prevent versions of IE from rendering in quirks mode. But isn’t it true that with a proper DOCTYPE, you can avoid quirks mode?

    And it seems that including something like

    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />

    causes the page to fail W3C validation.

    So is there any reason to include such a statement?

    Thanks

    # February 2, 2012 at 11:21 am

    As far as I’m aware, if the browser is using compatibility mode it will default to the default version of the browser and if IE has chrome frame installed it will make use of chrome frame.

    Edit: The title of this thread reminds me of Karl Pilkington

    # February 2, 2012 at 1:55 pm

    feel free to leave it out if your site is working fine in IE, but if it’s just a matter of appeasing the validators then you can include X-UA-Compatible in the htaccess file.

    here’s how: http://www.456bereastreet.com/archive/201103/x-ua-compatible_and_html5/

    # February 4, 2012 at 4:54 pm

    Sorry for the belated reply.

    Thanks for the responses.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".