I have some questions regarding js file based on Jquery :
1) Which algorithm is used to minify js files?
2) Is it easy to implement that algorithm programatically?
3) Is minifying js is reversible process? i.e. Can we able to get original js file from minified js file? If yes, Is it the same algorithm to unminify it?
Please help.
http://dean.edwards.name/packer/
http://crockford.com/javascript/jsmin
http://code.google.com/intl/pl/closure/compiler/
http://developer.yahoo.com/yui/compressor/
http://ajaxmin.codeplex.com/
You can write algo for minify your js by yourself but it would be better to use any of the above tools for this. Reason is that they are already providing good minification and they are time-tested
Minifying is a reversible process. Since browsers can only understand javascript, these algos need to be reversible. and so others can also reverse the minification.