Minifying a tagcloud widget

I was using an earlier built of this tagcloud widget. I wanted to minifying the widget. So, I started with using JSMin and found out that Prototype.js and window.js causes UnterminatedStringLiteralException with JSMin. So, I left these two files alone. Once I minified rest of the files, I cat the files into a single JavaScript. The net result was about 100k size reduction and a lot less number of connections for the browser. :)

Here is the cat command that I used:

cat libraries/prototype/prototype.js libraries/prototype/effects-min.js libraries/prototype/builder-min.js libraries/prototype/effects-min.js libraries/prototype/dragdrop-min.js libraries/prototype/controls-min.js libraries/prototype/slider-min.js libraries/prototype/scriptaculous-min.js libraries/prototype/window.js widgets/dialog/dialog-min.js widgets/tagCloud/tagcloud-min.js widgets/tagCloud/tagCloudDialog-min.js interface-json-min.js > tagcloud-all.js

Tagcloud widget

Thanks to Jonathan L. for the suggestion to check out this tagcloud widget. It’s interesting that someone would write a widget for this. I wrote a basic tag cloud before with simple scaling arithmetic to render tags in different font sizes. This widget adds a few more features. The extra features also add significant weight to the page footprint. So, some weeding work might be necessary to eliminate extra unneeded features.