For dynamic websites using many AJAX features, Javascript files often become large. We can reduce the file size - without changing functionality - with Javascript Minifier.
It is common pratice to write Javascript (or in fact any sort of scripting language) in such a way that it is readable. Readability is improved by comments, indentation, proper variable name declaration, etc. But this makes the source become larger than necesary. For most languages this is not problem, as a compiler translates the code instructions into a machine-readable language. For Javascript however, having large source files means more traffic. Let's reduce this.
There are many Javascript compressors available, such as Dojo Shrinksafe, Packer and YUI Compressor. But I prefer to use good old Javascript Minifier. Two reasons: 1) it is safe (it does not change any functionality, because it uses very simple shrink techniques) and 2) it is conveniently compilable from the C (so no Java required).
The source is available from Github and compilable with gcc -o jsmin jsmin.c. In this case, I am using jsmin for Wiziwig. On the development server, the non-minified versions of the Javascript files run. Upon pushing a new release to the production servers, jsmin is launched (on production server):
jsmin < site.js > site-min.js mv site-min.js site.js
The result looks like this.