Batch Process YUI Compressor.

Referring to an article "Best Practices for Speeding Up Your Web Site" from YUI, minifying JavaScript and CSS can improve the load time of the web site. In the article, YUI provides a link to an useful tool – YUI Compressor.

Yahoo did a good job in YUI Compressor which contributed to a comprehensive tool and yet better compression ratio as compared to other tools  available (e.g JSMIN, Dojo’s Compressor). However, this tool has been given out as a command line tool without user interface. Hence, using it to compress multiple files can sometime be very tedious. Here, I have written a simple Window Batch file that helps mitigate the shortfall.

You may download the tool here. How to use this tool?

  1. Download the tool from the link provided above.
  2. Extract it.
  3. Copy your JavaScripts files and CSS files to a directory under Build\Input.
  4. Execute the YUICompress.bat file.
  5. Viola! Your YUI compressed JavaScripts files and CSS files will be available under Build\Output.

Drop me comments if you found this useful. Thanks!


I don’t get paid for writing blog posts. Your “Like” is my only motivation, so please “Like” it if you found this information useful. Cheers!!!

Check out what other says about this post by clicking at the title of this post.

About these ads

Tagged: , , , , , ,

4 thoughts on “Batch Process YUI Compressor.

  1. jeeshenlee July 30, 2010 at 7:43 pm

    Hope you guys like it. :)

  2. jeeshenlee August 10, 2010 at 10:29 pm

    So far, I have 5 downloads of the batch process files. Tried it, 5 users already tested this and it works.

  3. bagusjavas August 27, 2010 at 1:05 pm

    nice work, i want try

    i think this will be helpful for other..

  4. mono November 2, 2013 at 6:02 am

    Great work..Great tool. Thanks a ton :)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 110 other followers

%d bloggers like this: