ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

How does gzip work on an EE installation?

October 03, 2007 3:40am

Subscribe [1]
  • #1 / Oct 03, 2007 3:40am

    rmedek

    131 posts

    Or, more specifically, if I’ve enabled gzip compression in Output Prefs, are files loaded from my Themes folder (.css and .js files) compressed as well? Or does the compression only apply to pages parsed by the templates?

  • #2 / Oct 03, 2007 6:39am

    Daniel Walton

    553 posts

    As far as I understand it, if the request is a page (e.g., template) then it is compressed. Flat files such as the css/js you mention won’t be handled this way… unless of course your apache has mod_gzip installed and configured to do so.

  • #3 / Oct 03, 2007 2:55pm

    rmedek

    131 posts

    Thanks, butcher…

    I ended up turning off gzip in the EE settings and instead dropping this in my .htaccess file:

    # enable gzip compression
    <FilesMatch "\.(html|php|css|js)$">
        SetOutputFilter DEFLATE
    </FilesMatch>

    At the moment I’m not sure if this is truly the way to go but it seems to be cutting down the HTTP request size, at least.

  • #4 / Oct 03, 2007 3:19pm

    Daniel Walton

    553 posts

    Deflate is less intensive on the server side since it uses memory rather than disk IO, so good choice 😊

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases