If we're using Apache GZip of javascript files should we still enable the GZip functionality in settings/performance? I presume not.
If we're using Apache GZip of javascript files should we still enable the GZip functionality in settings/performance? I presume not.
Comments
Comment #1
derjochenmeyer commentedUnfortunately I have no answer to this question.
Feel free to reopen the discussion.
Comment #2
gabble commentedSubscribing!
I have the following lines in my apache2 conf file:
So .js files are already sent compressed to the browser (but not cached by drupal I guess)
Do I have to disable DEFLATE for js files, and enable gzip compression provided by the module?
Comment #3
gabble commentedComment #4
bryancasler commentedsubscribe
Comment #5
vladsavitsky commentedI'm investigating this problem right now.
Compression level that gives this module is 9 (highest)
Compression level that gives Apache's mod_gzip is 6 (may differ in your case).
So using this module is more effective. Files compressed only once and compression level is higher.
Question is:
How to disable mod_gzip compression for .js files only?
Comment #6
psmx commentedSee the issue I posted a while ago:
http://drupal.org/node/1035412
In drupal core they are facing the same issues and use the E-Flag to disable compression for already compressed files.
Comment #7
gabble commented@psmx, I followed the link you posted and googled a bit but I couldn't find any indication on how to set such E-flag the way you suggest.
Can you be please more specific or point me any online resources out there?
Thanks a lot!
Comment #8
psmx commented@gabble
You could add the following flag to your rewrite rule: E=no-gzip:1 setting the environment variable to prevent apache from zipping the files again.
RewriteRule ^(.*)\.js $1.js.gz [L,QSA]to
RewriteRule ^(.*)\.js $1.js.gz [L,QSA,E=no-gzip:1]Check out CSS_GZIP module. They are disuccsing the same:
http://drupal.org/node/713880#comment-3410646
They got the idea from the new D7 .htaccess:
http://drupal.org/node/101227#comment-3176382
Hope this helps.
Comment #9
mikeytown2 commentedFYI I've stopped all dev work on CSS Gzip and am working on the Advanced CSS/JS Aggregation module. It's way better already in my opinion.