0

I'm trying to make Gzip compression work on xampp, right now this is in my .htaccess

<IfModule mod_deflate.c>

    AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
    AddOutputFilterByType DEFLATE text/css
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
    AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
    AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype

</IfModule>

The HTML file gets compressed, but nothing happens to the JavaScript and CSS files. Anyone know why? How to fix this? (if it's even possible)

5
  • mod_deflate installed and enabled? Commented Jun 13, 2012 at 7:11
  • Jup, as I said, compression works on html files, but on nothing else Commented Jun 13, 2012 at 7:16
  • 1
    Does the mime-types for javascript and css files that apache reports match up with the types you're adding? Commented Jun 13, 2012 at 7:18
  • @Crinsane You can try going to here and doing a HEAD request for a css and js file, or you can try looking for AddType for js and css in server config Commented Jun 13, 2012 at 7:24
  • Found out the browser still used a cached version of the js and css files Commented Jun 13, 2012 at 7:42

1 Answer 1

1

Okay... stupid fault... browser still used cached versions...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.