Gameon's Favourite Blogs >>
Anoop : : GameOn BuZZ ||                     || Hari S R : : Tranquility ||                    || ~==[[[ Abhi ]]]==~ : : Cogito Ergo Sum ||                    || Abhilash Sir : : A Leaf out of Life ||

Programming Simplified

A Freelancers Tips and Tricks On Programming With Php , Ajax , CGI -PEARL ,Javascripting , CSS and GM(grease-monkey)..




Compress your Javascript

Some ajax sites have to load lot's of javascript, and it might be spoiling your visitor's viewing experience (especially if they use dial-up).

You can compress you javascript easily, and it can be from just removing whitespace, removing empty lines, removing comments, to renaming variables, rewriting your code, and obfuscation.

So how to get started.

Many javascript compressors use regex based systems, or sometimes they strip all newline characters-which could be a problem if you do not use semicolons on every line.
For the best result, I start out with dojo shrinksafe () which compresses your variables (eg. var somerandomlongvariablename; to var _33; and automatically adds semicolons. for compression, it also removes comments etc.

Then you should try using something like or (enable base64 encode, and if you want- you can try shrink variables)



         

           My Photo

           Gameon


Web This Blog


AddThis Social Bookmark Button

Page copy protected against web site content infringement by Copyscape


XML


Powered by Blogger






© 2007 Programming Simplified | ..:nEo:..
No part of the content or the blog may be reproduced without prior written permission.