Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

It's just good common sense to have your server gzip your files before they send them to users (I use Nginx) Is there anyway to save the server some overhead and pre-zip those files for the server, and if not why?

For instance rather than giving the server an myscript.js and having the server zip the file and send it to the user, is there a way to create so the server doesn't have to?

share|improve this question
zip and gzip are different things, don't confuse them. – grawity May 24 '10 at 16:58
up vote 6 down vote accepted

I believe you can with nginx. Take a look at NginxHttpGzipStaticModule

share|improve this answer
sweetness...thanks! That was exactly what i was looking for! – Schneems May 24 '10 at 15:12
It's also worth pointing out that it will cache zipped versions, though it'll be limited to what fits in it's cache. – Chris S May 24 '10 at 15:16

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.