3

Yesterday I turned on caching, aggregation of css and js files and turned on compress cached pages. Then I logged out and closed my browser (FF). After a couple of minutes I openend my browser again, typed in the url of my website and got this error in FF: Content encoding error.

I tried opening my site in FF, Chrome and IE. None of them work.

I read some similar threads here and tried: - setting display_errors=Off in php.ini - disabling gzip of files in .htaccess - Changing "Header append" to "Header set" in .htaccess

Nothing seems to work.

What I would like to do now is manually disable caching, aggregation and compression in the database, but I don't know which tables these settings reside in.

1 Answer 1

4

Add this lines to your settings.php file.

$conf = array(
'cache' => '0',
'preprocess_css' => '0',
'preprocess_js' => '0',
'block_cache' => '0',
'page_compression' => '0',
);

or with Drush

// To turn on JS Aggregation

drush vset preprocess_js 1 --yes

// To disable JS Aggregation

drush vset preprocess_js 0 --yes

// To clear cache of JS and CSS only

drush cc css+js

// To enable CSS Aggregation

drush vset preprocess_css 1 --yes

// To disable CSS Aggregation

drush vset preprocess_css 0 --yes
6
  • Thanks for the quick response! It works, I can access my site again. Now I still need to figure out what exactly causes the "Content encoding error".
    – Smos
    Jul 9, 2013 at 9:08
  • 1
    @Smos Drupal sends these files gzipped to save bandwidth. But your servers messes with http headers. Some hosting companies thinks it's good idea, dunno why :|
    – Mołot
    Jul 9, 2013 at 9:16
  • @Smos Using Drupal output compression along with Apache mod_deflate can result in double compression. I don't recall getting a "Content encoding error" with this. When this happens, I have always seen a page full of junk characters.
    – mpdonadio
    Jul 9, 2013 at 13:17
  • @MPD home.pl used to mess my headers even without own compression. Content was compressed, once, but browser didn't get an info about that at all. So this can be screwed up at least 2 ways. But I bet there are more.
    – Mołot
    Jul 9, 2013 at 13:32
  • @Mołot Odd, never seen that one. Sounds line a bad proxy not honoring Vary: Accept-Encoding
    – mpdonadio
    Jul 9, 2013 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.