1

I'd like to understand what are the ....js.gz files located in sites/all/default/files/js.

I thought they are cached js files.

But if I clear all caches (drush cc all) these files still remain there.

I've made a capture of the folder: enter image description here

1 Answer 1

1

Like you said these are just cached versions of the javascript files. Drupal compresses them so they can be served to the user faster, notice the difference in file size between the version 29.1 KB opposed to 117.4 KB.

Are there any error when you clear cache through drush? Mostly I've found that they stay behind when you run drush as a user that cannot modify the files, e.g. a user not in whatever group owns the files. In this case you need to add your user to whatever group owns the files.

5
  • Not sure if I get you right, but if I run drush status the Drupal User is anonymous. Should I run some drush command to change to Drupal User to admin ?
    – chefnelone
    Commented Aug 2, 2012 at 10:04
  • I meant the linux/osx user your running the command from. Drush will be run with the same permissions as the user your running it from, can you try rm filename.js.gz? If you can't remove the file that way then there's your problem.
    – digital
    Commented Aug 2, 2012 at 11:34
  • I understand. I have no problem removing the file with rm filename.js.gz. Then I don't know why these files are not deleted when clearing all caches...
    – chefnelone
    Commented Aug 2, 2012 at 12:09
  • Are these files really in sites/all/default/files? Or sites/default/files? If the former, is sites/all/default/files really the configured directory for your files, as set at admin/config/media/file-system? Commented Dec 7, 2012 at 21:32
  • You get js and css files of the type in your image by checking ` Aggregate and compress CSS files.` & ` Aggregate JavaScript files.` @/admin/config/development/performance. If you run $ sudo drush cc all they clean up but for the latest ones. Commented Jan 9, 2014 at 19:12

Your Answer

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

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