From this page you can share Keeping Your JavaScript Small to a social bookmarking site or email a link to the page.
Social WebE-mail
Enter multiple addresses on separate lines or separate them with commas.
Keeping Your JavaScript Small
(Your Name) has forwarded a page to you from Ajaxonomy
(Your Name) thought you would like to see this page from the Ajaxonomy web site.

Keeping Your JavaScript Small

As you know that with websites speed is very important. Unfortunately many good JavaScript libraries are rather large (many are over 40K). Even with many people having high speed internet connections you should still try to keep your application under 50K (including the design). This is one reason that some tools ,such as General Interface, have only been adopted in the enterprise as people are guaranteed to have a faster connection.

One of the things that can make a huge difference in JavaScript size is to remove white space. I personally use MemTronic's FREEWARE HTML/JavaScript Cruncher-Compressor (click here to go to the application). The tool has various levels of compression and can make your JavaScript pretty small and even obfuscate your code (of course don't delete your original code or it will be hard to edit). I've seen code reduced by up to 70% using the tool, which keeps more complex applications loading quickly.


Try using the tool with your favorite JavaScript code and run some load tests, you'll probably even be able to notice the difference of load time. If you reduce your code, I'd love to hear how much smaller your code gets, so leave a comment of your results.