Why is this page text-only?

Results tagged “prototype” from Code Scene

Compressing Prototype and Script.aculo.us

 If you're doing web development these days there's a good chance you've used the Prototype and Script.aculo.us JavaScript libraries.  They're both excellent and free libraries which make time-consuming JavaScript tasks much much simpler.

The only problem with them is that they're not exactly small.  If you just want to add some simple scrolling or fading effects to a page, you're looking at adding 160KB of JavaScript files... ouch.

Enter Protoaculous, a version of the scripts combined and compressed to minimize load times.  The compressed version now adds only 39KB to your site.  If all you need is the Script.aculo.us effects library you could use a version which weighs in at only 27KB.

I used it on a site I recently built and everything seems to work great.  I highly recommend using this tactic to minimize the load times on your sites.

Download the Protopack zip file here

Side note:  A recent post of the WebDriven Blog alerted me to another option to solving this problem in Google's new AJAX library API.  With this, you can let Google host the prototype (or jQuery, mooTools, and dojo) libraries for you.  In theory since these scripts will be pulled from Google's ultra-fast servers, it should help speed up your load times as well.  I've yet to try this approach but would be interested in hearing from anyone who does.

Prototype.js Cheat Sheet

Just a really quick post today for something that I think will come in handy.  I was catching up on some blog reading today when I stumbled across a great cheat sheet that someone has put together for the Prototype framework.

Cheat sheets are a great way to familiarize yourself with any new language or framework.  This PDF catalogs the full Prototype API, while denoting in red which methods have been deprecated in version 1.6.  It's well worth the download.

Prototype 1.6.0.2 Cheat Sheet

There's also a great Prototype checklist on the site to make sure you're getting the most of out the library.