Yui compressor-another tool for compressing JS/CSS

Source: Internet
Author: User

Yui compressor is Yahoo! A small tool developed specifically for compressing JavaScript and CSS files. The operating system requires support from the JDK environment. To use this tool, install JDK and configure the environment variables of java_home.

JDK: http://www.oracle.com/technetwork/java/javase/downloads/jdk6-jsp-136632.html

JDK's java_home environment variable configuration method can take a look at this win7 configuration Java compilation environment, here will not be too much repeat.

After the JDK environment variables are configured, you can download Yui compressor. The installation of Yui compressor is much simpler. Open the downloaded compressed package and double-click Install. the CMD file is successfully installed, and a "process with yuicompressor" command is added to the right-click menu of the system, use this command on any JavaScript or CSS file to compress the file, as shown in:

Note that Yui compressor can only be compressed for files encoded as gb2312, GBK or gb18030 by default, if you want to compress the UTF-8 file you have to manually modify compressor. CMD file, replace the gb18030 with a UTF-8, You can compress the UTF-8 encoding file. Yui compressor has a high compression rate. A Javascript file is provided in the installation package for compression testing. The compression rate is as high as 50%.

 

From the rain night knife's blog: http://stylechen.com/yui-compressor.html#comment-182

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.