Should I use the YUI Compressor or the new Google Closure compiler to compress my JavaScript?

前端 未结 7 1976
野趣味
野趣味 2021-01-30 08:47

YUI Compressor was the consensus best tool for minimizing, but Closure seems like it could be better.

7条回答
  •  误落风尘
    2021-01-30 09:06

    From the comparisons I've seen, Closure seems to be the clear winner in terms of minimizing file size. This article uses three popular JS libraries (jQuery, Prototype, MooTools) to compare compression between YUI Compressor and Closure Compiler: http://www.bloggingdeveloper.com/post/Closure-Compiler-vs-YUI-Compressor-Comparing-the-Javascript-Compression-Tools.aspx

    Closure comes out in front in each test, particularly in its advanced mode, where it "minimizes code size about 20-25% more than YUI Compressor by providing nearly 60% compression."

提交回复
热议问题