Reputation: 25159
A little explanation: I'm building a library to handle some back and forth with our CMS and have decided to open source it. Right now I have a dependency on jQuery 1.5 for it's AJAX method, specifically the recently added statusCode object. This is the only depency, and I'm not expecting others.
Are there any lightweight AJAX only libraries out there capable of this functionality? I'd rather not include all of jQuery if necessary.
Upvotes: 2
Views: 775
Reputation: 8787
Just get those codes:
https://github.com/jquery/jquery/tree/master/src/ajax (get the files depending on what methods you use)
And gather them in a single file. It should work.
Upvotes: 3
Reputation: 169451
Look at ender
. Which allows you to include only what you want. I believe the ajax library included is very small.
You should avoid Single points of failure like having other services host code for you.
Upvotes: 3
Reputation: 42818
Why not call jQuery directly from google. Since most users use google, many will already have jQuery cached and will not have the need to reload jQuery when accessing your site.
<script src=" http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
Check out this blog 3 reasons why you should let google host your jQuery
.
http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/
Upvotes: 2