The thing is, if you’re willing to invest a few hours you can overcome the file size issue. What follows is a list of compression techniques and alternate libraries for making it happen. And don’t worry, you’ll earn the time back.
There are a number of tools out there to get the job done, but they all do the same thing, so you might as well use JSMin.
Running JSMin on prototype.js yields a final file size of roughly 71kb. That’s a significant improvement (~76% of its original size) for very little work, but still might be too large for some.
, getting file sizes below 20kb, and even lower when paired with gzip compression (see below). Unfortunately these aren’t official releases, so you may have to wait longer for updates, plus they’re unsupported.
If you’re not familiar with this technique, here’s a quick summary. Your clients’ browsers tell your server that they support gzip compressed files as part of their HTTP request headers. Your web server returns in kind with a smaller, compressed version of the content that is downloaded, decompressed and finally interpreted by the browser.
By enabling mod_deflate on Apache 2.x, I was able to reduce prototype.js 1.5.1 to roughly 23kb – about 25% of its original size. Similar modules are available for most web servers.
JQuery is distributed with a compressed version that weighs in at 19kb. The uncompressed version is 55kb. Prototype users will find the syntax fairly similar.
Another library is mootools, a fork of Prototype that’s also distributed in compressed form. Their website also lets you pick and choose the components you need, which may result in a significantly smaller library file.