Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

X-UA-Compatible: IE=9 vs IE=EmulateIE9, other browsers

My company uses an application from a third party vendor, therefore we have no control over the source code. The site has compatibility issues in IE10 (only) due mostly to the rendering of Javascript, as well as in other browsers (Safari, Firefox, Chrome).

Since we DO have control over our server, I asked our Hosting team to add a custom HTTP response header in IIS as follows, based on some Googling I did.

In the Name box --> X-UA-Compatible

In the Value box --> IE=EmulateIE9

Now I'm wondering if IE=9 would've been preferable, and if that would apply to other browsers besides IE.

So my questions are, specifically:

(1) What is the difference between content=IE=9 and content=IE=EmulateIE9 ?

(2) Would using content=IE=9 force browsers other than IE to render as IE9 ?

(3) I've seen an additional attribute for Chrome=1. Does this actually work ?

The html-5.com provides this definition, so it sounds like this tag would NOT work outside of IE, but I've seen so many other references to the Chrome=1 that I'm wondering otherwise.

X-UA-Compatible is used to indicate to an IE browser which version of the rendering engine should be used to display the page. This metatag does not affect other browsers such as Firefox and Opera, which in general attempt to avoid bloating the size of the browser code by displaying web pages only one way according to established standards (Supporting multiple rendering engines presents some major challenges, especially when content rendered by one engine accesses embedded content rendered by a different engine).

Thanks!

like image 531
user2394840 Avatar asked Aug 02 '13 19:08

user2394840


People also ask

Is X-UA-Compatible still needed?

The only reason to include the X-UA-Compatible meta tag in your HTML was to override a user's "Compatibility View" settings in IE8, 9 and 10 for your website. In almost every case the user will not have changed these settings (why would they?), and now those browsers are not even supported anymore.

What does equiv X-UA-Compatible mean?

tells Internet Explorer to use the highest mode available to that version of IE. Internet Explorer 8 can support up to IE8 modes, IE9 can support IE9 modes and so on. X-UA-Compatible Meta Tag Type: The X-UA-Compatible meta tag is a http-equiv meta tag.

How do you use X-UA-Compatible?

According to Microsoft, when using the X-UA-Compatible tag, it should be as high as possible in your document head : If you are using the X-UA-Compatible META tag you want to place it as close to the top of the page's HEAD as possible. Internet Explorer begins interpreting markup using the latest version.

What does content ie EDGE mean?

Edge mode tells Internet Explorer to display content in the highest mode available. With Internet Explorer 9, this is equivalent to IE9 mode. If a future release of Internet Explorer supported a higher compatibility mode, pages set to edge mode would appear in the highest mode supported by that version.


1 Answers

  1. The difference between using IE=9 and IE=EmulateIE9 is that using IE=9 forces standards mode for IE9, while EmulateIE9 will respect the DOCTYPE to determine standards or quirks mode. See this link for more details (although it's a little dated): http://blogs.msdn.com/b/askie/archive/2009/03/23/understanding-compatibility-modes-in-internet-explorer-8.aspx

See Daniel's answer for 2 and 3, but the short version is that this has zero effect on other browsers.

like image 99
seanmk Avatar answered Oct 25 '22 12:10

seanmk