This is an update to a post from 2011: Protoaculous 1.9.0 Minified. In the older post, I published Protoaculous 1.9.0 which was based on Scriptaculous 1.9.0 and PrototypeJS 1.7.0.
- A newer version of PrototypeJS is out: 1.7.2. So I’ve updated Protoaculous to use the newer version.
- Switched away from YUI Compressor to Google Closure Compiler since it produces more compressed files.
- I was previously using Scriptaculous version number as Protoaculous’ version number. This type of versioning is flawed because it doesn’t work when only PrototypeJS gets updated. So I’m now using Scriptaculous_version-Prototype_version.
- I’ve published the script I use to create new versions of Protoaculous on Github: Protoaculous Bundler.
I have not tested how well the combination of the two scripts perform. Please use caution and testing before using it in a production environment. Although previous versions have performed well.
While generating protoaculous using Google Closure Compiler, I noticed the following issues, which should probably be fixed by the PrototypeJS team:
Size of Prototype.js + Scriptaculous = 314K
Size of Protoaculous.js Minified = 166K
I would suggest:
- Turning on gzip functionality (mod_deflate on Apache) for all html and js/css/etc assets in your webserver to get filesizes even lower. This would ensure your users get the files even faster.
- Adding very long expiration dates (like years) through your webserver on js/css/etc assets. This would ensure your users do not have to download the files again and again. Since the files are versioned, there should not be a problem in cache busting on newer updates.