开发者

Lightweight JS AJAX library [closed]

开发者 https://www.devze.com 2022-12-15 20:58 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations fo开发者_StackOverflowr books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 2 years ago.

Improve this question

My friend and I have a site (www.rosasecta.com). It uses a lot of Ajax, but it's all by hand, and it's really ugly and hard to dig through. We want to switch to a JS library, but JQuery, Prototype, and Dojo are to large. We just want a small, compact library that can do AJAX cleanly and some basic DOM selecters. Can anybody recommend one?

Thanks in advance.


The selector portion of jQuery, dojo (and some of the other frameworks) is actually available as a separate library, the Sizzle Selector library:

http://sizzlejs.com/

Sizzle purports to be only 4kb minified and gzipped according to their site.

However, with ajax too, I think a customized jquery with only the smallest bits may be the best "complete package". Some of the other libraries like dojo have methods of building them with exactly the features you want, too.

The default jquery minified+gzipped is only 19kb. I think a core build can be done down to only 12kb.


jQuery isn't large at all, and you can use Google's hosted version meaning many of your users won't even have to download it upon visiting your page.

You requested:

  1. Lightweight
  2. AJAX Capabilities
  3. DOM Selectors

You've practically got jQuery already.


jQuery minified at aro 56K is less than the size of a typical JPG file. It will do everything you need and a whooooooole lot more


Zepto.js: http://zeptojs.com/#download (8kb gzipped)


What about MooTools? It won't provide everything jQuery will, but if it will do what you need, it's very small.


Atomic.js , Size is less than 1kb and angular style , simple js library https://github.com/cferdinandi/atomic

Read more

https://ultimatecourses.com/blog/writing-a-standalone-ajax-xhr-javascript-micro-library

0

精彩评论

暂无评论...
验证码 换一张
取 消