Page 1 of 1

Gzip - should it include stylesheets?

Posted: Mon Nov 03, 2008 5:05 pm
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?

Re: Gzip - should it include stylesheets?

Posted: Mon Nov 03, 2008 5:56 pm
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

Posted: Mon Nov 03, 2008 11:20 pm
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?

Posted: Tue Nov 04, 2008 10:59 am
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

Posted: Tue Nov 04, 2008 4:31 pm
by Don Chambers
Thanks Garvin - did not realize you were talking about 2 different gzip possibilities.