http://validator.w3.org/check 抱怨
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
为什么呢?
以下是完整的HTML。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" >
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<title></title>
<!--I dont particularly apreciate bundles in their current beta state. I used them only for big libraries only-->
<link href="/Content/EricMeyerReset.css" rel="stylesheet" type="text/css">
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.0.4/css/bootstrap-combined.min.css" rel="Stylesheet" type="text/css" >
<link href="/Content/Site.css" rel="stylesheet" type="text/css" >
</head>
<body>
<script src="//code.jquery.com/jquery-latest.min.js" type="text/javascript" > </script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.19/jquery-ui.min.js" type="text/javascript" ></script>
<!--http://www.asp.net/ajaxlibrary/cdn.ashx#Knockout_Releases_on_the_CDN_10-->
<script src="//ajax.aspnetcdn.com/ajax/knockout/knockout-2.1.0.js" type="text/javascript"></script>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.0.4/js/bootstrap.min.js" type="text/javascript"></script>
<!--If Jquery fails the fall back to local version-->
<script type="text/javascript">
!window.jQuery && document.write('<script type="text/javascript" src="/Scripts/jquery-1.7.2.min.js"><\/script>')
</script>
</body>
</html>
答案 0 :(得分:3)
因为它实际上并不有效。话虽如此,它并没有真正伤害任何东西,但有一些方法可以摆脱它并使用.htaccess文件https://groups.google.com/forum/#!msg/html5boilerplate/bRtrFSrKjtI/AOa44To23nMJ完成相同的结果。
答案 1 :(得分:0)
我认为不是&#34;有效&#34;我认为是总bs。所以在这里: 在IIS中
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear/>
<add name="X-UA-Compatible" value="IE=edge, chrome=1"/>
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
在Apache
中<IfModule mod_headers.c>
BrowserMatch MSIE ie
Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
IfModule>
IfModule>