Gzip - should it include stylesheets?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Gzip - should it include stylesheets?

Post by Don Chambers »

I was just poking around one of my sites using the YSlow plugin for Firebug, and noticed that it says none of the stylesheets are gzipped.... I do have the gzip configuration option set to "yes". Should these stylesheets be gzipped? Is there a good reason why they are not?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Gzip - should it include stylesheets?

Post by garvinhicking »

Hi!

gzip enabling also requires your PHP to support gzip compression. If you enable it and your server doesn'T have it, it wouldn't be compressed
.
Only the main style.css can be delivered with gzip compression through s9y (because its routed through serendipity.css.php). All additional stylesheets woudl need a server .css compression method, independently from PHP.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Thanks Garvin - Interestingly enough - the file serendipity.css file is not listed by Yslow as gzipped. I found this htaccess code for gzipping my other css files, and it seems to work, but does not affect serendipity.css, I'm assuming, because it does not really exist:

Code: Select all

#GZIP stylesheets
<IfModule mod_deflate.c>
<FilesMatch "\.(css)$">
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
So why would serendipity.css not be considered gzipped by Yslow?
=Don=
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Because of the missing PHP Gzip, as I mentioned? Did you check that?

Apache gzip and PHP gzip are completelely independent. One can disexist without the other.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post by Don Chambers »

Thanks Garvin - did not realize you were talking about 2 different gzip possibilities.
=Don=
Post Reply