简体   繁体   English

哪个X-UA兼容优先? Http-header或Meta-tags?

[英]Which X-UA-Compatible takes precedence? Http-header or Meta-tags?

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? 如果您的HTTP标头和文档上的元标记都有X-UA兼容,并且它们会发生冲突,哪一个受到IE的尊重?

TL;DR: The meta tag wins TL; DR:元标记获胜

I found the following (updated) flowchart here (link is broken) and associated blog post that provides an explanation of how IE9 determines document mode: 我在这里找到了以下(更新的)流程图(链接已断开)以及相关的博客文章 ,其中提供了IE9如何确定文档模式的说明:

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 竞争X-UA兼容的元标记 - Competing X-UA-Compatible meta tags 一页上有多个X-UA兼容的元标记 - Multiple X-UA-Compatible meta tags on one page 内网站点忽略X-UA兼容的HTTP标头 - Intranet sites ignoring X-UA-Compatible HTTP header 使用元标记“与X-UA兼容” - using meta tag “X-UA-Compatible” 使用meta http-equiv =“ X-UA-Compatible”后,Web应用程序会触发其他按钮 - Web application triggers different button after using meta http-equiv=“X-UA-Compatible” 运用 <meta http-equiv=“X-UA-Compatible” content=“IE=8” /> 网站模式的良好做法? - Using <meta http-equiv=“X-UA-Compatible” content=“IE=8” /> mode in sites good practice? 误解了<meta http-equiv=”X-UA-Compatible“ content=”IE=edge“> - Misunderstand of <meta http-equiv=”X-UA-Compatible“ content=”IE=edge“> 是否 <meta http-equiv=“X-UA-Compatible” content=“IE=Edge” /> 禁用条件? - Does <meta http-equiv=“X-UA-Compatible” content=“IE=Edge” /> disables conditionals? <meta http-equiv=“X-UA-Compatible” content=“IE=7” />该代码的作用是什么? - <meta http-equiv=“X-UA-Compatible” content=“IE=7” /> What does this code do? 标签 <Meta http-equiv=“X-UA-Compatible” ..> 对于iframe不适用于IE8 - Tag <Meta http-equiv=“X-UA-Compatible” ..> for Iframe not works in IE8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM