What gzip_types are recommended?

mike mike503 at gmail.com
Wed Dec 10 02:34:57 MSK 2008

On Tue, Dec 9, 2008 at 1:40 PM, KT Walrus <kevin at my.walr.us> wrote:
> What gzip_types are safe to compress with most  browsers?  Can javascript
> and css be safely compressed?

I have this
gzip_types text/plain text/css application/x-javascript text/xml
application/xml application/xml+rss text/javascript;

seems to work well. Never had any complaints.

> http://wiki.codemongers.com/NginxHttpGzipModule#gzip_types
> Might be nice to update the link above with the answer.
> Also, can I make sure that Javascript and CSS files are cached for the user
> and can I set an Expires: time for these file types?


location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
        expires max;

> Thanks.  I'm new to nginx and I am trying it out to see how much it helps
> with performance for a PHP coded forum site.

http://getfirebug.com + yslow! for firefox. makes determining this stuff easy

More information about the nginx mailing list