Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 myscript.js.zip 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
add comment

1 Answer

up vote 6 down vote accepted

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

http://wiki.nginx.org/NginxHttpGzipStaticModule

share|improve this answer
    
sweetness...thanks! That was exactly what i was looking for! –  Schneems May 24 '10 at 15:12
1  
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
add comment

Your Answer

 
discard

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.