- Code, Content, and Presentation
---- CSS Selectors and Page Speed
- 5:43 pm on Mar 14, 2011
so just how do you minify JS?
My preference is the Yahoo
] the java package and expand it in a directory of your choice. Next, to make it as easy as possible, do this:
Copy/move your original js file into the "build" directory
Run the following command:
java -jar yuicompressor-x.y.z.jar myfile.js -o myfile-min.js --charset utf-8
Move the js and the minified js back to your working directory
Only use the
option if your file is encoded in utf-8.
Brought to you by