The Speedy module is designed to help speed up front end performance in a site.

The Speedy module provides minified versions of core JavaScript files that are not already minified. For example, a minified version of drupal.js is provided while jquery.js (already minified) is not.

Why Do Minified Files Matter?

A majority of the time it takes for a page to load occurs in the front end. According to recent measurements on average, for the most trafficked 50k sites, 87% of the time it took to load the page happened in the front end. Serving smaller files will improve this performance.

Minifying the files removes comments, whitespace, and can even transform parts of functions in ways to make them smaller. For example, a minified drupal.js is 24% the size of the original. The minifier used to generate these files is UglifyJS. This is the same one jQuery uses.

Drupal 8

A Drupal 8 version of the module will not be provided. It is recommended that sites transition to using the Advanced CSS/JS Aggregation module for optimal front-end performance.

Drush Integration

If you want to generate you own minified files for a version you need drush and UglifyJS. If you just want to use the module and have minified files you don't need any of this. While the generation of the minified JavaScript files happens though UglifyJS, drush is used to do the integrations using the command:

drush smj uglifyjs

The uglifyjs on the end is the path to the uglifyjs command from the cli. It will tell you which files succeeded and if there were errors with any of them. Note, files with errors are generated and the error output is in that files.


  • If you modified any core JS files don't use this module. The changes you made will not show up in the sites.

Why Not Use On The Fly Minification?

This is a complicated questions. Here are a few details that guided me to an approach that ships minified files.

  1. jsmin-php, the PHP version of JSMIN, is no longer maintained. I found some bugs in it, too.
  2. Inline processing with jsmin-php takes some resources to generate minified files. I did some benchmarks and found the time to be too long for my tastes.
  3. Some JavaScript files provide multiple license comments in a file and there isn't a consistent way to note these. We don't want to remove those accidentally.

Where did the name come from?

On the children's television show Mr. Rogers' Neighborhood there was the Speedy Delivery Service (for old school mail). That's where the module name comes from.

This module was developed by HP Cloud Services.

Project information