Javascript Compression

Dojo Shrink Safe Javascript Compressor
The Javascript Compressor

The standard is to rename the source file first as uncompressed, then with the date:

  • fileName_UNCOMPRESSED_2007_01_30.js
  • fineName.js

In compressing any javascript file, compress first with Dojo, then re-compress with Javascript Compressor.  The Javascript compressor may break the file from working in IE or FireFox, where it won't if it's run through Dojo first - which does not compress as much.

Note, when developing

  • Open uncompressed file, copy contents to compressed file
  • Make any necesary changes
  • When everything is done and tested
    • Save all changes to new file, title UNCOMPRESSED and then current date
    • Compress the normal file

EXAMPLE

  • tabs.js (uncompressed: 12KB)
  • tabs.js (Dojo compressed: 11KB)
  • tabs.js (Javascript compressor: 7KB)