* View * CVS instructionsModules · Developer · JavaScript utilities · Performance and scalability · Theme related · Utilityderjochenmeyer - January 17, 2008 - 01:07Javascript AggregatorThe aim of the JavaScript Aggregator module is to improve performance of your site with less server requests and bandwidth per page. In Drupal 5, all the JavaScript files will be aggregated into one file and optionally minified. JavaScript aggregation was brought into core with Drupal 6, so the Drupal 6 version of this module goes one step further to minify that file.It basically does the following: * Takes the $scripts variable and removes .js files using a regular expression * Generates a unique filename for any set of .js files * Creates and caches one file containing all .js files in files/js * Optionally minifies the JavaScript using JSMin * Returns a modified $scripts variable with link to cached fileTo aggregate the JavaScript files in Drupal 5:
"To add CSS or JS that should be present on all pages, modules should not implement this hook, but declare these files in their .info file."
CSS files can be added to a .info file using the following format: