Which X-UA-Compatible takes precedence? Http-header or Meta-tags?
Asked Answered
W

1

18

As the question states basically. If you have X-UA-Compatible in both your HTTP headers and a meta tag on your document, and they conflict, which one gets respected by IE?

Waters answered 3/2, 2012 at 12:33 Comment(0)
M
27

TL;DR: The meta tag wins

I found the following (updated) flowchart here (link is broken) and associated blog post that provides an explanation of how IE9 determines document mode:

enter image description here

Manners answered 22/2, 2012 at 23:44 Comment(2)
Its funny MS own documentation does not mention the Meta tag and simply states: "... the webpage is displayed in standards mode because it contains a <!DOCTYPE> directive that defines the page as an HTML5 document type." Yet it will fallinto quirks without the Meta tag. msdn.microsoft.com/en-us/library/cc288325(v=vs.85).aspxIguanodon
More info here: blogs.msdn.com/b/cjacks/archive/2012/02/29/…Angst

© 2022 - 2024 — McMap. All rights reserved.