Search code examples
htmlx-ua-compatible

What is the point of X-UA-Compatible?


I don't understand at all what <meta http-equiv="X-UA-Compatible" content="..." /> is for...

Can someone explain...

  • What it does for different values of content?
  • What omitting it does for different browsers?
  • What the motivation for it is?
  • Why it exists?

Solution

  • It's a horrible hack to cater for different bugs or incomplete implementations in various versions of the Internet Explorer browser. For example, this:

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
    

    will instruct IE9 to pretend it's really IE7 to avoid any problems that might occur if your site works in IE7 but not IE9.