跳到主要內容

Closure Compiler vs. YUI Compressor vs.Ajax Minifier

Test compression rate via following tools:
  1. Closure Compiler (2010/01/04)
  2. YUI Compressor 2.4.2 (2009/06/10)
  3. Microsoft Ajax Minifier 1.1 (2009/11/15)
Source file: jQuery 1.3.2 regular, jQuery 1.3.2 minified
jQuery 1.3.2 regularjQuery 1.3.2 minified
Original 124,99557,254
Closure Compiler (default) 55,334 55,334
Closure Compiler (advanced) 49,647 49,647
YUI Compressor57,524 56,705
Microsoft Ajax Minifier (default) 72,346 56,061
Microsoft Ajax Minifier (hypercrunching) 53,573 53,570

由上表可知,Closure Compiler不管source是否有經過其他方式壓縮,都能做出正確地壓縮,達成最小壓縮;贏家為:Closure Compiler!


Conclusion: Closure Compiler can provide minimized javascript, it's the best choice!


2011 Update: Please take a look at UglifyJS – 更強大的 JS Compressor

留言

這個網誌中的熱門文章

自然人憑證讀卡機驅動程式

鳥毅用的是第一代的自然人憑證讀卡機,EZ100PU(後來有同事買EZmini可以讀SIM卡似乎更好),每年報稅時用一次。 本來只是要申請些政府業務,一時之間找不到光碟,沒想到在 驅動程式下載 居然看到Linux和Mac的驅動程式,剩下的就是政府單位的網頁和程式應該改版了吧!!!

Personal Bookmark

Java SE 6 + Firefox 2 UI 問題 As I do . Google拋棄了了SOAP API,浮想聯翩 https://www.gandi.net/ VS 2005 SP1中文版推出 Windows Vista中文版下載 ASP.NET 2.0網頁執行管線與快取原理 Cache 2.0快取架構與快取資料自動移除架構圖 flickr sync 分享與試用 SUN Looking Glass 3D圖形介面發布1.0 雅虎勵精圖治推動改革 Wait and see 國內某SOC疑遭駭客入侵 大砲開講 Very Important! 微軟公佈Vista安全程式介面草案 一窺Google開原碼庫房乾坤 qing is writing a dig girl net... wait and see

好用的 MadEdit Rust 重製版 支援多平臺

 從小寫程式就一直和編輯器為伍,除了 PE2 之外,DOS時代最好用的就是漢書。到了 Windows 以後,大概就是 UltraEdit 最強,但是公司不給買。因此我在多年前一直使用另一套非常快速而且支援多語系判斷又有簡轉繁的 MadEdit 。但是很可惜,原作者沒空再維護,幾年前又出現 MadEdit-Mod 的維護版,但後來也沒維護。我在 Mac 與 Linux 上找不到相同的好用編輯器,所以藉著 AI 的能力,自己打造一個 Rust重製版MadEdit 。