Enable GZIP compression for a CMF/Plone Site |
Created by dsteven . Last modified 2004-01-10 03:10:55. |
How to enable gzip content-encoding for all or part of your zope site. |
I am just getting into plone, but have played with Zope for quite a while. I knew that Zope 2.6+ had inbuild support for gzip content encoding, but wasn't sure how to enable it. In the past, I always used apache to gzip content to save me some bandwidth, and with plone 2, my front page was on the order of 200k without gzip. However, apache (2.0.40) was not keen to compress the big style sheets or javascript, so I edited HTTPResponse.py, and turned on gzip encoding for allowed types. Page was now around 100k - much better size for a first visitor. This is the wrong way to do it. My solution was to use the
Here is my access_rule request = container.REQUEST RESPONSE = request.RESPONSE Be careful - some older browsers can deal with gzip text/html etc, but barf on javascript and css. I've only tested with ie6 and Mozilla. The method restriction stop WebDAV breaking. I hope this helps |