tags:

views:

24

answers:

2

My server doesn't seem to gzip my css and javascript files. It works for HTML.

Here's my config: http://pastie.org/1105941
And here's my result: http://i35.tinypic.com/audv0k.jpg

Also tested Google Page Speed, and made Apache2 log the compression results. They say the same.

What could be wrong here, since it does compress the HTML?

A: 

Download a CSS file with a browers and check the content type. Chances are that it's application/binary or something. If that is the case, you must tell the server that *.css should be sent as text/css, etc:

AddType text/css .css
Aaron Digulla
A: 

As far as I can see, it is working ... using firefox and the webdeveloper plugin the response for both css and js reports gzip

alt text

alt text

AlberT
Wow I feel stupid! Yes it works. I changed the config file for the production server, while later testing the staging one! Haha :D
Frexuz