http://www.refresh-sf.com/yui/
This online tool uses YUI minifier which is the best i could find till today in terms of compression size. To my wonder, after compressson i had to do nothing no tweaking, no error lookups but just use the compressed code and it was ready to run in production.
It basically adds one space after each line that it compresses so it is less error prone as compared to other tools that try to compress completely and then after compression create a piece of messed up code and you need to manually use your ideas to get the code working again.
Steps:
1. Open the online YUI compression utility at http://refresh-sf.com/yui/
2. Copy and paste the javascript code from the javascript file to the text box.
3. Select File Type as ‘JS’ in the drop down box.
4. There are other options on the page but the default options are fine.
5. Press ‘Compress’ button.
6. It will emit a compressed version of the javascript code submitted above.
7. Copy and paste the new minified version of the js code in a file and use this file now.
8. Verify all the functionality in the project and make sure nothing is broken.
9. If something is broken, go to the original javascript file and make sure that all the semicolons are placed after each statement and again compress and verify.
Happy Compressing!!!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment