Which JavaScript AJAX Framework is most powerful and very lightweight?
-
03-07-2019 - |
Question
I've been using jQuery to do the whole AJAX magic in my web based applications.
But I came to a decision that I don’t need all these amazing features jQuery has, except its AJAX functions (like $.ajax()
, $.get()
, $.post
, getJSON()
and load();
).
Can you recommend a lightweight crossbrowser AJAX library/framework (up to ~10 kb)?
Solution
You can make jQuery smaller by removing the modules you don't need / Just modify the Makefile file.
OTHER TIPS
MochiKit might fit your needs: http://mochikit.com/
Although lightweight and powerful it might not meet the 10kb requirement (you can trim it down to only the async module)
The equivalent methods would be:
doXHR
doSimpleXMLHttpRequest
evalJSONRequest
loadJSONDoc
sendXMLHttpRequest
Really lightweight there is SACK (Simple AJAX Code Kit) I don't use myself but it looks really simple
edit : I checked, the js file is about 5kB
MooTools...!!
Don't believe the jQuery guys ... ;)