Reputation: 2152
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?
Upvotes: 2
Views: 7185
Reputation: 109
If the other examples doesn't work, try this:
<IfModule mod_headers.c>
Header set Vary "Accept-Encoding"
</IfModule>
Upvotes: 0
Reputation: 331
Add this one in .htaccess file ,it will work
<IfModule mod_headers.c>
<FilesMatch ".(js|css|xml|gz|html)$">
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>
Upvotes: 0
Reputation: 51
Maybe you want use this:
<IfModule mod_headers.c>
<FilesMatch "\.(js|css|xml|gz)$">
Header append Vary: Accept-Encoding
</FilesMatch>
</IfModule>
with semicolon
Upvotes: 5