Better Output Compression plugin

Plugin details

I want to be able to compress my output text that I send to the browser from my Rails app. This will include HTML, javascript, Ajax responses, plain text etc. Lighttpd will perform this function for the static files it serves, but not for the dynamic files, so I went looking for a solution.

Repositoryhttp://craz8.com/svn/trunk/plugins/output_compression/ Author Tom Fakes Tags compression LicenseMIT

Documentation

Install the plugin:
ruby script/plugin install http://craz8.com/svn/trunk/plugins/output_compression/

Some notes:

* The request must be checked to see if the browser supports gzip encoding before sending the compressed data
* I don’t do the gzip detection entirely to spec, if q=0 in the accept encoding header, GZIP should be disabled.

Since the request accept-encoding header must be checked, and the content-encoding header added, the original code example could never have worked correctly. My version of the code should work in most cases.

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, about 1 year ago