3

I'm experiencing the duplicate CSS issue mentioned in drupal.org #830382: Unwanted / duplicated temporary css files if CSS Optimization is enabled. In one of my production sites I have about 335 CSS files consuming 3.2M. While this is not a big deal at the moment but certainly not saner to let it grow as such. The site is relatively small and using not more than 10 CSS file. The issue link referred above doesn't seem to have any direction. I would like to hear from the experts here to fix it. Thanks in advance.

  • I see similar problem with js files as well. – Sivaji Feb 1 '12 at 8:42
  • 1
    The d.o issue you linked to mentions that the problem likely originated with the ajax_load module, and that module's queue has a few relevant issues. Did you investigate that module and rule it out as the cause? – sheena_d Feb 3 '12 at 19:14
  • @sheena_d, I don't use ajax_load in my site. – Sivaji Feb 4 '12 at 8:16
  • 7
    I very much doubt you can get anything out of this question without far more context. There are to many different modules that could be involved, and you have told us nothing useful about your setup. – Letharion Feb 4 '12 at 19:18
  • 7
    When you write that your site has 335 css files, do you mean that there are 335 files ACTIVE? (That is to say, that are served to a web client when a page is accessed?) Or are they simply present in sites/default/files/css? – jmarkel Feb 5 '12 at 21:51
5
+25

I think your problem is about aggregate css files. The issue you give is unrelated. Each page may need a different aggregate CSS file (even in D7, it's much better than it was in D6). It results in hundreds of CSS files as you may state.

Nothing to worry about. Unused file will be deleted automatically. I can't suggest you to use Advagg module because it is only for D6 now, but take a look to have an idea about aggregate files actually work (and how they should work).

0

335 does sound like rather a lot... I wonder if it is a sum of CSS files which have been used?

Try clear your cache to make sure CSS files are being automatically deleted. You should see them all disappear and then gradually be rebuilt as pages are requested which required different CSS files.

If they are not being deleted it might be worth checking file permissions to ensure Drupal has permission to delete them once they are no longer needed.

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.