This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Install & configuration » gzip compression of output

gzip compression of output

gzip compression of output

Friday 13 May 2005 2:22:31 pm - 5 replies

I'm currently experimenting with an interesting approach to gzip encoding of ezPublish output. See

It seems to work (although I've not tested it through a badly configured proxy!) and reduces the size of the PHP output by 75%. Next step is to figure out a way of using mod_rewrite to serve compressed static content (my hosting service doesn't support mod_gzip or mod_deflate).

Anyone else tried this/any comments?


Friday 13 May 2005 2:38:38 pm

OK - now the static part.

Add a gzipped copy of the CSS files e.g. site.css.gz whilst keeping the original site.css file.

Next modify your .htaccess file to add the following lines:

AddType text/css css gz
AddEncoding gzip gz

RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond  %{REQUEST_URI} ^(.*).css
RewriteCond %{SCRIPT_FILENAME}.gz -f
RewriteRule ^(.*).css $1.css.gz

Again it all seems to work and dramatically reduces the bandwidth. This time with no server overhead.


Friday 13 May 2005 5:28:38 pm


Thanks Geraint!

This thread has great potential as an eZ publish FAQ under Performance Optimizations.


<i>Orson Scott Card : Xenocide</i>

Modified on Saturday 14 May 2005 7:16:59 am by // kracker

Friday 13 May 2005 5:34:21 pm


I remember a thread about gziping the content of the pages too. (a php only solution with ob_handler), have a look.

Also, a great trick on css is to "strip" them down (ie, erease the spaces, cr, comments...). You can find programs doing that (same for js).

Beware that some browsers (ok, maybe antics like NS4) don't cope at all with compressed css.


Saturday 14 May 2005 7:26:04 am

Here is a list of all the other relevant eZ publish :: ( gzip / mod_gzip / mod_deflate / ob_gzhandler ) threads I've seen on



<i>eZ publish : Everything Is Possible !</i>

Fatboy Slim : Weapon Of Choice

Modified on Saturday 14 May 2005 7:27:50 am by // kracker

Friday 08 October 2010 3:34:46 pm

I cannot access

Can you post teh information here please...



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from