Drupal Performance Settings in Code
After launching a Drupal site, one of the first things on the checklist is to turn on CSS and JS caching. This really helps speed up loading times, you just have to remember to clear the cache if you update the theme on the live site.
However, I've always been frustrated by the fact that these helpful settings get pulled into the development environment whenever the production databased is pulled in. You pull in the database, start editing a CSS file and can't figure out why nothing's changing. Then, you finally remember to go and turn off CSS and JS caching.
So I finally decided to override these settings once and for all in the site's private settings file (the one that includes the local database name and password instead of keeping those in settings.php).
It's a simple two-liner that will save much time and frustration:
$conf['preprocess_css'] = FALSE;
$conf['preprocess_js'] = FALSE;



Commentaires
Poster un nouveau commentaire