Vary Accept-Encoding header don't works

AlexZd picture AlexZd · Jun 15, 2012 · Viewed 7.1k times · Source

I added next lines in .htaccess, which I found here How to specify vary accept encoding header in htaccess

    <IfModule mod_headers.c>
       <FilesMatch "\.(js|css|xml|gz)$">
         Header append Vary Accept-Encoding
       </FilesMatch>
     </IfModule>

but it isn't works, also I checked phpinfo (Loaded Modules: mod_headers...). I use Page Speed plugin and I can't see this header in my css file. Why it isn't works?

Answer

Demian picture Demian · Jul 24, 2012

Maybe you want use this:

<IfModule mod_headers.c>
   <FilesMatch "\.(js|css|xml|gz)$">
     Header append Vary: Accept-Encoding
   </FilesMatch>
</IfModule>

with semicolon