2012-09-06 56 views
2

http://validator.w3.org/check 抱怨爲什麼W3C驗證抱怨<META HTTP-當量= 「X-UA-兼容」 內容= 「IE =邊緣,鉻= 1」>

<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

我想這不是「有效」,我認爲這是總的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> 
相關問題