Friday, December 21, 2007

Packing Down Prototype

In the world of client-side development, page size definitely matters and John-David Dalton is doing his best to improve this. Awhile back, he took on the task of trying to determine how to best optimize the 120k+ Prototype and Script.aculo.us libraries and get the best compression out of the files. He's done an absolutely fabulous job in the past and continues to pack the libraries as new versions are released. He's just released his new version of his compressed Prototype collection and released it on Google Code.


This pack contains the following compressed versions of Prototype: 1.4, 1.5, 1.5.1.1, 1.6.0 and Scriptaculous: 1.7.1_beta3, 1.8.0. This release compresses Prototype and Scriptaculous around 10% more than regular gzipping.


Prototype's lowest weighs in at 20.4kb.

Scriptaculous' lowest weighs in at: 19.7kb.

Protoculous' lowest weighs in at: 38.4kb.


Compressed forms of Scriptaculous are segmented to allow for custom builds of Protoculous/Scriptaculous.


He has included a common custom build with the pack, "Prototype+Effects", which weighs in at around 26kb. That's smaller than standard Prototype gzipped!


Protoculous also allows the loading of additional js files like Scriptaculous via: protoculous.js?load=one,two


You can download his collection here and included in the download is a readme file providing more details about his build.




No comments:

Post a Comment