treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] X-UA-Compatible - Do I need it?

  • 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
  • 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
  • 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/
  • Sorry for the belated reply.

    Thanks for the responses.