Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I'm using D7, recently I checked all the bandwidth optimization option in admin/config/development/performance, I wanted some change-back in CSS afterwards, which now I can't with the bandwidth optimization being checked. I tried unchecking that bandwidth optimization, then it accepts the new change. But when I check the bandwidth optimization again, it takes me to an older version of CSS, Please let me know how to update the CSS as well as checking all the optimized radio buttons.

share|improve this question

1 Answer

CSS/JS aggregation's purpose is to bundle all your non-external css/js files into a single file. This way instead of requesting multiple files and requiring multiple connections with the server, the client only has to download the unified css/js file once. However, this specific file is not re-created every time you make a change to your css or javascript. You will have to manually do it. Here is how:

In Drupal 7 go to: Administration > Configuration > Development > Performance (admin/config/development/performance)

and click the "Clear all caches" button. Notice that this will clear all caches of your site.

The method that I use more often though is to clear all the caches through Drush (if you do not know what Drush is, you should really check it out since it's a real life saver). Instead of navigating to the URL and clicking the button, you can just write the simple command:

drush cc all

in your command line and all caches will be cleared.

Keep in mind, that if you are still theming/developing your site, you should disable CSS/JS aggregation. If you don't, you are adding more workload to the server that is rebuilding the unified css/js files every time that you press the "Clear All Caches" button. The specific option should only be turned on on production sites where css/js files have been finalized.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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