0

enter image description here Every time I make the slightest CSS change, I need to clear cache to see the changes.

What can be done about this?

  • You must have CSS aggregation turned on. Turn it off (see mikeytown2's answer) by UI, or add relevant configuration to the settings.php file so you don't have to worry about it in prod/live changes. – AyeshK Nov 4 '14 at 4:03
6

Install AdvAgg, go to admin/config/development/performance/advagg and set "AdvAgg Cache Settings" to "Development"

If you don't want to do that, go to admin/config/development/performance and uncheck "Aggregate and compress CSS files" as well as "Aggregate JavaScript files"

Another option is to install the admin menu module. That has an option to just clear the css/js cache.

|improve this answer|||||
  • Hey man, my first priority is no-module solution. Let me tell you that The two checkboxes you mentioned where unchecked by default, and yet I need to go time and again to the Admin-Menu Drupal figure to clear cache... I have uploaded an image of my Performance screen. You are invited to tell me what you think. – Ben Nov 6 '14 at 20:16
  • If that's the case then you most likely have the browser caching the individual css files. Doing a forced refresh (ctrl-F5) should do the trick. The reason flushing caches works is because drupal adds .css?HASH to the end of the filename; so when you clear the caches, that hash value changes and your browser downloads a new version of that file. – mikeytown2 Nov 7 '14 at 0:02
  • I'm sorry but I was wrong... For some reason it's still not working, and the CSS changes change only after I click "Flush all caches". I've clicked several times at CTRL+F5 (Both left and right CTRL) and none happened. only the tiresome clicking of "Flush all caches" did that. Please help me finish with this problem... – Ben Nov 11 '14 at 16:36
0

The main problem of this specific case seems to be a server-side, and not a Drupal side one --- I store at Siteground.com and they automatically turn on the Cpanel tool named "Super cacher" that caused all this mess and apparent lifetime wasting (and yet it raises the chance for good SEO when you site needs no further touches).

Anyway, When you guys develop online and experiencing this forced Caching problem and nothing else helps - just turn the "Super cacher" off in Cpanel. It would be nice though to find a way to keep it on, but to edit witouht FAC. In other words - keep Mikey's solution on hand (See link above).

From the moment this was off, I no longer needed to click "Flush all caches" for every single CSS change and just F5 was enough.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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