This module allows on-the-fly minification of site JavaScript with uglify.js.

The module relies on a web service ( by default to do the minification so you do not need to do any pre-processing on your server to enjoy the benefits of minified JavaScript.

Note: The default service location was relocated on December 5, 2014. You will need to update to 7.x-1.2+ to continue using the service. If you do not update the module your site will still work but your JavaScript will no longer be minified by the service.

How it works

If you're on core Drupal or are using a version of Pressflow prior to 7.20.1 you will need to implement hook_uglifyjs_info() and provide an array of scripts that are safe to minify. More documentation is available in the module's README file.

Why not just use Speedy?

This module takes a more "fire and forget" approach than Speedy does. Modules can define scripts that are safe for minification and then the minified versions will be created whenever they are needed, rather than before hand in a development environment, etc. This also avoids needing to make sure that the minified versions of your JavaScript are correct in version control since a simple cache clear will determine whether or not files need to be re-generated.

Supporting organizations: 

Project information