On this page
Advanced Aggregates Minify JS
OVERVIEW
Minify JavaScript files using a 3rd party minifier. AdvAgg includes a few and supports one faster compiled PHP extension. The options are:
-
JSMin +: No installation required. Usually the second best minification, however it is the slowest supported option.
-
JShrink: No installation required, JShrink is reliable and has fairly comparable minification to JSMin.
-
JSqueeze: No installation required, JSqueeze provides the most effective minification and is the fallback if another minification method fails. It is still fairly slow.
-
JSMin: The fast compiled C extension for PHP. Supports PHP 5.3+ and 7.x. Must be installed separately. Much faster than the other options but slightly less reliable although that is mostly mitigated within AdvAgg. See below for more details.
CONFIGURATION
Located at admin/config/development/performance/advagg/js-minify
-
Minification: Select a minifier: Choose which minifier to user. [Default: Disabled]
-
Add licensing Comments: If enabled will include comment with path to the original file in every optimized file. Better follows the spirit of GPL but not required to conform. Will increase file size slightly. [Default: Enabled]
JSMIN PHP EXTENSION
The AdvAgg Minify JavaScript module can take advantage of jsmin.c if it is available and selected as minifier. In that case, JavaScript parsing and minimizing will be done in C instead of PHP dramatically speeding up the process. The JsMin extension can be found at GitHub. There are instructions on installing and compiling it there. Note that if you are using PHP 7.x you'll need to use the feature/php7
branch rather than the master
branch.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion