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
- Returns a modified $scripts variable with link to cached file
- enable the module
- go to admin/settings/performance and enable the js cache (you'll also find an option to clear js cache)
- place the following code inside your page.tpl.php file just before
<?php print $scripts; ?>
Its not good practice however to place php code in your tpl.php files. If you are more familiar with drupal, USE THIS WAY TO CALL THE FUNCTION:
To Minify and Gzip the aggregated file in Drupal 6:
- Enable the module
Typical Example of performance increase:
FILENAME SIZE DESCRIPTION 6e13ccb6262e06b9f890414db56d3b1f.js 289.558 Bytes > Aggregated by Drupal Core 6e13ccb6262e06b9f890414db56d3b1f.jsmin.js 173.243 Bytes > Minified with JSMin 6e13ccb6262e06b9f890414db56d3b1f.jsmin.js.gz 47.618 Bytes > Minified and gzipped
- Maintenance status: Actively maintained
- Development status: Maintenance fixes only
- Reported installs: 2,075 sites currently report using this module. View usage statistics.
- Downloads: 39,494
- Last modified: December 2, 2014
- Stable releases receive coverage from the Drupal Security Team.
Look for the shield icon below.