Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The pagespeed tool says

Compressing could save 95.0KiB (66% reduction).

but when I test for GZIP it shows that it works.

I have my htaccess and conf files setup correctly (i think).

How can I verify? Is the pagespeed tool wrong? How to I make this work?

share|improve this question
The page in question is – Kirk Strobeck May 18 '12 at 19:47

See web server response headers using firebug in firefox or developer tools in chrome:

If resource is gzipped you will see header:


You can also use any CLI web clients, e.g. wget:

wget -S -O /dev/null 

It doesn't show content-encoding, but if you use

wget --header='Accept-Encoding:gzip,deflate,sdch' -S -O /dev/null` 

Connecting to connected.

HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Date: Fri, 18 May 2012 19:51:12 GMT
  Server: Apache
  Last-Modified: Fri, 18 May 2012 19:42:04 GMT
  Accept-Ranges: bytes
  Cache-Control: max-age=31536000
  Expires: Sat, 18 May 2013 19:51:12 GMT
  Vary: Accept-Encoding
  Content-Encoding: gzip   <================================ Look here
  X-Powered-By: PleskLin
  Connection: close
  Transfer-Encoding: chunked
  Content-Type: application/javascript; charset=utf-8
share|improve this answer
Right, I don't see it on here – Kirk Strobeck May 18 '12 at 19:46
I've tested your url with wget -S -O /dev/null It doesn't show content-encoding. but when I use wget --header='Accept-Encoding:gzip,deflate,sdch' -S -O /dev/null content-encoding is set properly and response size is smaller. so, your mod_gzip is set up properly – DukeLion May 18 '12 at 19:53
Thank you!! it turns out my company network somehow prevents that header. Thank you! – Kirk Strobeck May 18 '12 at 20:15
If you can please edit your answer to reflect the comment, i will award – Kirk Strobeck May 18 '12 at 20:16
@KirkStrobeck Many corporate proxy servers don't support compressed encoding as they'd have to decompress and recompress that content to filter/scan/classify it. – Chris S May 19 '12 at 2:07

Add this to .htaccess

<Files *.js.gz>
ForceType text/javascript
Header set Content-Encoding: gzip
<Files *.css.gz>
ForceType text/css
Header set Content-Encoding: gzip
<Files *.html.gz>
ForceType text/html
Header set Content-Encoding: gzip
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.