bmalen Posted July 10, 2011 Report Share Posted July 10, 2011 I enabled "Aggregate JavaScript files" in my Drupal 7 website but this produced a problem with javascript. I checked the HTTP response of one of the javascript files and it appeared that it was getting compressed twice: Content-Encoding: gzip Content-Type: application/x-gzip So I guess Drupal is compressing the file then LiteSpeed is compressing it again. I edited my .htaccess (generated by Drupal) and commented everything under "Rules to correctly serve gzip compressed CSS and JS files." This seemed to fix things. I checked the HTTP response again, all looks good: Content-Encoding: gzip Content-Type: application/javascript This is as much as I could find on the issue http://drupal.org/node/986558 I am no expert on this issue and I can't find any clear instructions, so I am not sure if what I did is the "correct" way to fix the problem. If anyone else is running Drupal on LiteSpeed and has come across this issue, I would appreciate your feedback. Quote Link to comment Share on other sites More sharing options...
Michael D. Posted July 11, 2011 Report Share Posted July 11, 2011 LiteSpeed is configured to automatically gzip JS if the browser requests gzipped content so any scripts/directives that force gzip compression on can cause issues. If you've disabled it in Drupal then you shouldn't have any issues. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.