0

I use mod_deflate to speed my site up. I have one JavaScript file that will not deflate (I believe because it ends .js?ver=3.1 rather than .js). Below is my .htaccess code:

<IfModule mod_deflate.c>
AddOutputFilter DEFLATE js css
<filesMatch "\.(js)$">
    SetOutputFilter DEFLATE
</filesMatch>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml
#The following lines are to avoid bugs with some browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html 
</IfModule>

<IfModule mod_headers.c>
<FilesMatch "\.(js|css|xml|gz)$">
Header append Vary: Accept-Encoding
</FilesMatch>
<FilesMatch "\.(ico|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "max-age=29030400, public"
</FilesMatch>
<FilesMatch ".(xml|txt|css|js)$">
Header set Cache-Control "max-age=904800, proxy-revalidate"
</FilesMatch>
</IfModule>

Any ideas?

Mike Fitzpatrick
  • 143
  • 1
  • 11

0 Answers0