Making Prototype Smaller

Tagged:  

Prototype is one of the most used JavaScript libraries and is used for many other libraries. The problem with Prototype is that it is a rather large library. This has forced many people to either shy away from the library or to try and modify it. I say that just for the $ (for those of you who haven't use prototype the $ is used like document.getElementById) functionality the library is worth using.

I ran Prototype through ShrinkSafe and was able to get the code quite a bit smaller. The Prototype.js (I'm using version 1.6) file went from 122K down to 82K. That is an amazing 40K less which helps in using the library.

Below is a demo using the compressed and uncompressed versions of Prototype (the demo uses Script.aculo.us 1.8 and is taken from the demos that come with that library)
Click here to see the uncompressed version
Click here to see the compressed version

You can download the compressed version of Prototype here.

Now that you have a smaller version of Prototype use it to improve the load time of your application.

prototype.png

I wonder how much smaller it would get with Yahoo UI Compressor: http://www.julienlecomte.net/yuicompressor/

The links seem to be broken the the js files?

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <div> <blockquote> <object> <embed> <img> <param>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Copy the characters (respecting upper/lower case) from the image.