# Why Can't I Pre-Zip Server Files?

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?

-
zip and gzip are different things, don't confuse them. –  grawity May 24 '10 at 16:58

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

http://wiki.nginx.org/NginxHttpGzipStaticModule

-
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