Tbcompressor JS code Compression _javascript Skills

Source: Internet
Author: User

Tbcompressor

The company's original JS and CSS files are compressed with the online compression program, seemingly convenient, but very easy to make mistakes, may be a compression program to the CSS inside some of the hack statements to confuse, so I decided to use the famous Yui compressor.

But Yui Compressor also has a disadvantage, that is, the operation is not humane, to use the input command line operation, in the actual application is also a bit inconvenient. Taobao discovered today the development of a software--tbcompressor, the software is in Yui compressor based on the improvement, the use of very simple, please see Lifesinger "Tbcompressor–js and CSS compression tools," a text. The following is the use of tbcompressor, download please go to http://code.google.com/p/ourtools/downloads/list download, select the yuicompressor_2.4.2.zip files.

    1. After decompression click inside the install.cmd installation, if the uninstall click uninstall.cmd can be;
    2. In the JS file or CSS file to compress the right button, in the pop-up menu select process with yuicompressor;
    3. The original file in the same directory will generate a compressed file, the filename is the original file name followed by a "-min." For example, the original file name is "test.js", then the compressed file is "test-min.js". It is recommended that the filename be taken to the name.source.js type, which automatically compresses the generated name.js file.

Note: tbcompressor The default compression file encoding type is GB18030, if you want to compress other encoding types of files to modify the installation directory under the compressor.cmd file, the inside of the GB18030 replace it with the type of code you want. For example, I used the UTF8, the GB18030 changed to utf-8 on the line. Tbcompressor compression rate is not too high, but is very safe, for CSS file hack can also be a good reservation. If you are a neat person for code, you can also use your compressed files to optimize.

Here are some of the online optimization of JS and CSS Web sites, but these compressed code in the runtime may be wrong, so use caution:

    • http://javascriptcompressor.com/
    • Http://www.xmlforasp.net/JSCompressor.aspx
    • http://compressorrater.thruhere.net/
    • http://jsbeautifier.org/
    • http://www.codebeautifier.com/
    • http://www.lonniebest.com/FormatCSS/
    • http://www.cssdrive.com/index.php/main/csscompressor/
    • Http://tools.arantius.com/css-compressor
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.