nginx gzip_static not following gzip_types

Maxim Dounin mdounin at
Tue Apr 24 08:47:03 UTC 2012


On Tue, Apr 24, 2012 at 02:36:07AM -0400, ctrlbrk wrote:

> Thanks for the quick reply.  It would be nice if there was a simple top
> level directive added to make it follow the gzip_types rule.  The
> default behavior of trying to compress images is pretty futile.  Even if
> I had my bash script compress images to serve up, the extra
> decompression time on the client would cause the page to be slower, and
> bandwidth savings of probably less than 1% at expense of much, much more
> than 1% increased client CPU.

It doesn't try to compress anything, it's up to you to compress 
files you think is ok to compress.  The gzip_static just checks if 
a '.gz' file present, and returns it to client if it's present 
(and client supports gzip).

If you want to avoid file lookup, you may (and probably should) 
disable gzip_static for locations you don't want lookup to happen.

Maxim Dounin

More information about the nginx mailing list