Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" ... Putting this in .htaccess?

I downloaded html5 boilerplate and it wouldnt validate with this in the header.

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >

I was told I can add this to .htaccess for the same effect to avoid validation errors.

<IfModule mod_headers.c>
  Header set X-UA-Compatible "IE=Edge,chrome=1"
  # mod_headers can't match by content-type, but we don't want to send this header on *everything*...
  <FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|xpi|safariextz|vcf)$" >
    Header unset X-UA-Compatible
  </FilesMatch>
</IfModule>

My question is

  1. How do i test to make sure this is working properly
  2. What does the filesmatch parameter do? should i be modifying that or is that pretty good as-is?
like image 503
Tallboy Avatar asked Sep 27 '11 10:09

Tallboy


1 Answers

Try to pass it through the web.config or htacess file

Web.Config

<httpProtocol>
  <customHeaders>
    <clear />
    <add name="X-UA-Compatible" value="IE=Edge,chrome=1" />
  </customHeaders>
</httpProtocol>

your page will be valid after that. Sorry I am not a php guy.

like image 189
Giroin Avatar answered Oct 09 '22 11:10

Giroin