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.
- After decompression click inside the install.cmd installation, if the uninstall click uninstall.cmd can be;
- In the JS file or CSS file to compress the right button, in the pop-up menu select process with yuicompressor;
- 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