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

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