Monday, January 9, 2012

Test Your Javascript for performance before you go live

Optimizing your JavaScript is very important while you develop hybrid applications for mobile platform or web applications.
Few optimization steps to make your hybrid application faster and good.

1) Compress each of your JS and CSS files for removing white spaces and merging.
java -jar E:\Compress\yuicompressor-2.4.7\build\yuicompressor-2.4.7.jar E:\application\application.js -o
E:\application\application.js --charset utf-8 
java -jar E:\Compress\yuicompressor-2.4.7\build\yuicompressor-2.4.7.jar E:\application\application.css -o E:\application\application.css --charset utf-8

2) Test Your Javascript for performance before you go live
JS lint
3) Good notes to optimize your JS
JS Optimization