Maintanance Status

Due to the fact that the head.js javascript library is no longer being developed, I decided to take what I learnt here and implement it for the $script.js library which is essentially the same thing but much stabler and (soon/hopefully) under active development.

Grab the module here or learn more about $script.js here.

Headjs module uses the totally awesome head.js library by the same author of jQuery Tools to dramatically improve javascript loading times by adding only one script to the document's head and then downloading all other script files in parallel.

Since downloading many small files at the same time is faster than downloading one big file, head.js makes pages load blazingly fast and is especially beneficial for mobile browsers who limit the size of individually cached javascript files.

For more information see: http://headjs.com/#theory

Pitch

Try dropping it into your Drupal installation and watch your site speed up. It can also be combined with Boost and/or CDN for even better results!

Simply put: It just works! (mostly)

Installation

As of version 2.0, the 6.x branch now requires Advanced CSS/JS Aggregation

Download & install the module, download the head.js library and copy it to sites/all/libraries. No further configuration is needed!

HeadJS is a plug-and-play module. Install it, adjust the optional settings and forget about it.

Add javascript normally using drupal_add_js(), add it to your theme's .info or even include it inline in your templates and HeadJS will detect it and replace it with the optimized head.js version!

Dependencies

Compatibility

The brand new 6.x-2.x branch aims to improve compatibility even more by using advagg's hooks to alter the javascript output.

HeadJS has been tested extensively and has been known to play nicely with pretty much all contrib modules out there that use javascript significantly. However, there are no guarentees of any sort. If you are experiencing issues please file an issue!

Support

For bug reports and feature requests, please file an issue. Thanks!

If you want to use a script-loader but are unsure about head.js, check out LabJS.

Maintainer

The maintainer provides consulting services and paid development, e.g. for implementing a specific feature. Help improving the module and get in contact!

Project information

Releases