View Full Version : Slimming Down Prototype & Scriptaculous

04-12-2008, 04:22 PM
I really like prototype and scriptaculous but in combination they're HUGE. In total my js downloads on the site I'm working on at the moment is over 200Kb and thats minified, with gzip its down to 50Kb but thats still massive for what is essentially, a few minor interface niceties.

Now, I'm sure I could reduce that down massively if I could cut prototype and scriptaculous down to just the parts I'm using. Prototype is over 120Kb now (uncompressed) but all I'm really using it for is $() and the ajax stuff. I honestly don't use anything else that I can think of but I also use scriptaculous' autocompleter and occasionally the drag/drop & sorttables (but not often). I use prototip quite frequently too, so how can I shrink it all down without breaking anything or losing the functionality I've come to depend on.

Someone must have wanted to do this before now, but I've no idea what I would google for. Is there anywhere I can go to find out all the various dependancies?

04-12-2008, 10:08 PM
hope you've tried their discussion group.

An excerpt from one the discussions (http://groups.google.com/group/rubyonrails-spinoffs/browse_thread/thread/58b83fca3235b3d2/9cfc58b902921b1e?lnk=gst&q=modular+prototype#9cfc58b902921b1e)

"...a lightweight prototype included in moo.fx or moo-tools and
you can find a link to a compress version of 1.5.0 final in the blog.."

In case you don't get any answers, try their irc

#prototype on irc.freenode.net.

My search keyword was "modular prototype"

04-13-2008, 12:39 AM
The mootools prototype.light.js includes just the stuff needed for moo.fx but none of the ajax stuff. Googling for modular prototype might turn up something though.