As I stated earlier, the prototype.js library is too large for just using AJAX. In its current version (1.4.0_pre10) it weighs 36KB and contains lots of other features that are most probably not needed when just dealing with AJAX.
I have therefore created a smaller version just for AJAX, based on 1.4.0_pre10: pt.ajax.js 8.9K
It now has only a quarter of size and still provides some nice features such as $
as a wrapper of document.getElementById
.
Creating this was not too difficult: it is merely a combination of 4 files that make up prototype.js:
- HEADER (needs modification from the original prototype.js)
- prototype.js (without includes)
- base.js
- ajax.js
Just do copy and paste into a new files, i.e. copying each file to the bottom of your new javascript file.
As you can see, you can easily create your own customized (smaller!) version of prototype.js to fit your needs.
I agree with you the way you view the issue. I remember Jack London once said everything positive has a negative side; everything negative has positive side. It is also interesting to see different viewpoints & learn useful things in the discussion.
Could you elaborate on how to build a custom lighter prototype lib?
I can’t find any info on this…
Thanks,
dnc
It is very usefull i used it in blogger categories:http://blogger-categories.blogspot.com/
36 kb ? i think it’s more like 100Kb :)