7 messages in ru.sysoev.nginxRe: What gzip_types are recommended?
FromSent OnAttachments
KT WalrusDec 9, 2008 1:40 pm 
mikeDec 9, 2008 3:34 pm 
KT WalrusDec 9, 2008 8:50 pm 
mikeDec 9, 2008 9:15 pm 
KT WalrusDec 9, 2008 10:44 pm 
mikeDec 9, 2008 10:53 pm 
Igor SysoevDec 9, 2008 11:07 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: What gzip_types are recommended?Actions...
From:mike (mike@gmail.com)
Date:Dec 9, 2008 3:34:34 pm
List:ru.sysoev.nginx

On Tue, Dec 9, 2008 at 1:40 PM, KT Walrus <kev@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?

Yes

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