Hi,

I have the option to use mod_deflate. I assume I would switch it on by AddOutputFilterByType DEFLATE text/css application/x-javascript (correct?)

Could you please confirm I can still use your module with

* switch GZip CSS checkbox OFF

and with
* switch GZip JavaScript checkbox (from JavaScript Aggregator module) OFF
and
* switch Page compression to Disabled

Is that correct? Or is there a reason for switching off mod_deflate and turning the above three settings on?

I am asking this because I had LOTS of problems with double compression in D5 (showing nonsense characters to anonymous visitors unpredictably), and I want to avoid it now in D6.

Thanks!

Comments

mikeytown2’s picture

AddOutputFilterByType DEFLATE application/x-javascript text/* would be a better setting IMO; compressing all text documents: html, css, js, ect. Downside to mod_deflate is the file is not cached, it is compressed for every request. So it depends on your apache server and how much CPU it has to spare. Also you should probably add in some sort of check to make sure the browser can handle deflate compression. Various Web Resources:
http://newestindustry.org/2006/10/03/compressing-web-output-using-mod_de...
http://www.digitalsanctuary.com/tech-blog/general/apache-mod_deflate-and...
http://www.cyberciti.biz/tips/speed-up-apache-20-web-access-or-downloads...

You should not use the CSS Gzip module if your using mod_deflate. Pick one way to do it. If the checkboxes are off then CSS Gzip should not interfere with mod_deflate (because CSS Gzip is doing nothing). You can minify the javascript (via JavaScript Aggregator module) and use mod_deflate. All my module does is gzip the css; it is pointless if your using mod_deflate.

Logic:
If mod_deflate then
- no CSS Gzip
- no JS Gzip
- only use minify from the JavaScript Aggregator module, if desired
- disable page compression

Flying Drupalist’s picture

Hi, informative answer. But which way is better and which way is recommended? Since on the project page it says: Compresses the content once and saves the result (less CPU load on server). I assume that means there is caching and hence using the module is superior to using apache deflate?

mikeytown2’s picture

You are correct, it does cache the gzipped content. So in general this is a better way to do it, since it generates less server load. If you have mod_disk_cache up and running correctly then this is a toss up IMO. For most setups, CSS Gzip is the best solution.

horrorview’s picture

Is this something you'd recommend using on a production site, or should I wait until I get everything else sussed?

Thanks!
Jim

mikeytown2’s picture

@horrorview
Everything is already figured out; there are 2 "simple" ways of gzipping your css. Option A is this module, Option B is to use mod_deflate inside your .htaccess file. Option A (this module) is very easy to do and the way I recommend doing it. It's definitely production ready http://drupal.org/project/usage/css_gzip.

horrorview’s picture

Hey Mikeytown!

Sorry, I wrote that at around 2:30 am. LOL. What I actually meant was that I'm still working on the site (ie; I'm IN production! LOL...god...sleep deprivation and Drupal are a wonderful thing). Should I wait to use the module until after I've finished the site? :)

Thanks!!
JIM

mikeytown2’s picture

Depends where you are at in your development. If the site is close to being done with little to no css changes AND are looking at ways to speed up your side, then this would be an important part of that. On the other hand if your turning on css aggregation just so you can use this module, then this module might not be the right thing to do at this point in time. Once you have live traffic it's a good idea to turn it on; speeds up your site, which is always a good thing. My advice, be smart.

horrorview’s picture

Thanks Mikeytown2!

I've downloaded the module, and will enable it once I'm done fiddling with all of the CSS. I've got at least another month's work ahead of me :)

Best!
JIM

mikeytown2’s picture

Status: Active » Closed (fixed)

closing this issue, it's stagnant.