0

I'm on the new side to coding so this is mysterious to me:

On several sites that I'm working on the jQuery library stops being added through drupal behaviors spontaneously as javascript and module files and page templates are altered. Once the site cache is cleared through drush the behaviors properly call jQuery again.

I work with 3 others, and though our database is centralized our file trees are local. We use git for version control.

Any information as to why this caching incident keeps happening would be very helpful. I'm trying to learn more about the caching process but so far I haven't found anything that clears this up.

1

Just like when you add a menu item or some theme elements, you need to clear the cache when you add new javascript.

For a site in development mode you can simply turn off caching so that you don't have to remember to clear the cache every time ('drush cc all' is handy):

Drupal 6: /admin/settings/performance: Caching mode set to disabled

Drupal 7: /admin/config/development/performance: Uncheck cache pages for anonymous users

Disabling "aggregate javascript", will make it much easier to debug your js with chrome or firebug.

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.