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