Agile Web Development

Build it. Launch it. Love it.

Better Output Compression

Provide a filter to perform gzip and deflate compression of action output. Handles proxy caching and component rendering correctly.

Contributors:

  Tom Fakes    - Initial simple implementation, plugin implementation
  Dan Kubb     - Handle multiple encodings, correct response headers
  Sebastian    - Handle component requests

Vitals

Repository http://craz8.com/svn/trunk/plugins/output_compression/
License Rails' (MIT)
Tags Tag_red
Rating (5 votes)
Owner Tom Fakes
Created 25 May 2006

Comments

  • Avatar
    Dave Pitman
    15 October 2007

    I've discovered that IE6 doesn't gracefully handle Rails' Cache-Control header ('no-cache') with gzipping. See http://www.justsuppose.com/2007/09/more-flash-and-ie-6-gotchas-2032-error.html for more details. To fix this, I added this code just below ln 49 of output_compression.rb: if controller.response.headers['Cache-Control'] == 'no-cache'

      controller.response.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate, max-age=-1'
    end
    

Add a comment