2012-02-09 58 views

回答

2

尝试http://jscompress.com/在线工具。

什么是jscompress?

JSCompress.com是一个在线JavaScript压缩器,允许您压缩和缩小您的JavaScript文件。压缩的JavaScript文件非常适合生产环境,因为它们通常会将文件大小减少30-90%。大部分文件大小减少是通过删除Web浏览器或访问者不需要的注释和额外的空白字符来实现的。

为什么我要压缩Javascript?

有多种原因压缩JavaScript文件的原因是一个好主意:

* Quicker download times for your users. 
* Reduced bandwidth consumption of your website. 
* Reduced number of HTTP requests on your server when combining many javascript files into one compressed file, thus reducing the server load and allowing more visitors to access your website. 
* Comments and whitespace are not needed for javascript execution; Removing them will speed up script execution times. 
相关问题