SameShirtEveryDay.com

Personal blog of the one called Alex Gorbatchev, from Toronto, Canada.

YUI Compressor – JavaScript minification

Posted on December 13th, 2007 by Alex Gorbatchev. In JavaScript. 2 comments!

In my current Silverlight project the amount of JavaScript is growing exponentially. Everything that I took for granted in Flash which took years to build and “perfect” now needed to be converted to JavaScript.

For the first beta release which is looming next week, the amount is about 130k. “Compressing” it with JSMin yields a file of 75kb in size. Yesterday I tried YUI Compressor which managed to squeeze it down to 65kb.

I’m very happy I no longer have to look at JSMin code which induces gag reflex and makes my eyes bleed. The amount of effort and self restraint it took not to rewrite it can not be described in words.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 comments.

  1. hk

    Thanks to your bullshit recommendation I wasted half an hour downloading and trying out that stupid YUI compressor. It takes prototype.js down to 75KB. The Dean Edwards compressor at http://javascriptcompressor.com/ takes it down to 50.

    Should have known better than to listen to a god damn Silverlight developer. Thanks for wasting my time, asshole!

  2. Alex G

    Don’t cry sweetheart – results may vary.

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> , rel="nofollow" in use - no link dropping, no keywords or domains as names; do not spam, and do not advertise!

home
Subscribe to this blog Follow me on Twitter My bookmarks on Delicious My photography on Flickr