Automated packing programs can remove white space and comments, and some can abbreviate names. For maximum control, however, abbreviate your object and variable names manually. Where possible, defer program execution and loading, and compress larger scripts located in the head. Here's a list of the techniques you learned in this chapter:
Trim the fat by removing excess whitespace and comments, and using semicolons to avoid any misunderstandings.
Minimize HTTP requests by combining files and merging or embedding scripts on high traffic pages.
Defer or delay loading where possible (but avoid sticky pages).
Load only what's necessarysegment API code (NS4, IE5, DOM, and so on).
Compress larger external files located in the head.
Abbreviate and map names automatically or manually to make your optimization reversible.
Crunch and obfuscate your code to shrink scripts and deter prying eyes.
Create self-extracting archives if entering the 5K competition.
Use ESC or Blue Clam to abbreviate variable and object names for maximum packing.
Programming Pearls, 2nd ed. by Jon Bentley (Addison-Wesley, 1999)See Column 10: "Squeezing Space."
http://www.ecma.chThe ECMAScript Standards.