Yahoo Compressor
-
03-07-2019 - |
Question
Any one know how can I apply Yahoo Compressor (YUI compressor) on my website?
Solution
Here is the README on the YUI Compressor. And here is the How To use from their site.
OTHER TIPS
You need to use the YUI compressor to compress your .js
and .css
files before putting them on the server. Since the compressor is written in Java, you need to run the java file for compression. This is copied from YUI web:
Using the YUI Compressor from the command line
$ java -jar yuicompressor-x.y.z.jar
Usage: java -jar yuicompressor-x.y.z.jar [options] [input file]
The following command line (x.y.z represents the version number):
java -jar yuicompressor-x.y.z.jar myfile.js -o myfile-min.js
will minify the file myfile.js
and output the file myfile-min.js
. For more information on how to use the YUI Compressor, please refer to the documentation included in the archive.
You use YUI compressor to compress javascript files before you load them on your website, so creating smaller downloads. It's not used for on the fly compression. Look for Http Compression modules or enable compression on your webserver.