Use a tool such as YUI Compressor to:
- remove unnecessary white spaces
- remove unnecessary line breaks
- remove unnecessary semi-colons
- shorten local variable names
This operation can be automated using Google’s Apache mod_pagespeed module.
A standard 248 KB JavaScript file will be 97 KB after being minified.