Christophe
Christophe

Reputation: 28114

Lightweight JavaScript libraries for modern browsers

I am looking for a lightweight JavaScript library, for use in secure environments where all users have recent browsers (IE 9, Firefox 4 for example).

I am looking for wrapper features like AJAX, animations and cross-domain messaging. I don't care about the overhead to support older browsers (stuff like JSON parsing or querySelectorAll is native).

Any library to recommend?

Upvotes: 2

Views: 850

Answers (2)

voidstate
voidstate

Reputation: 7990

I would just use the base part of the Dojo Framework. Dojo only loads what it needs, so although there's tons of widgets, modules and other stuff in the framework, the base is only 31k.

You can get it from Google by including this in your head.

<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" type="text/javascript"></script>

And then if your project needs to grow, you can start adding in the modules you want and don't have to learn a new framework to do so.

Check out the tutorial to see how Dojo works.

Upvotes: 0

Matty F
Matty F

Reputation: 3783

Take a look at http://microjs.com/ - choose what type of library you'd like and it will show you all that come in under 5k.

Also take a look at Ender - http://ender.no.de - for composing your own library from other micro-frameworks.

Upvotes: 3

Related Questions