views:

329

answers:

4

Any one know how can I apply Yahoo Compressor (YUI compressor) on my website?

+2  A: 

Here is the README on the YUI Compressor. And here is the How To use from their site.

Ascalonian
+1  A: 

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.

Richard
A: 

The documentation for it is here: http://developer.yahoo.com/yui/compressor/

You use it to compress/minify your JavaScript and CSS files.

If you're interested in speeding up your site, have a play around with YSlow too: http://developer.yahoo.com/yslow/

Conor McDermottroe
+1  A: 

You need to use the YUI compressor to compress your .js and .css file 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.

http://developer.yahoo.com/yui/compressor/

Billy