Online Tools

Select one (or more) JavaScript files to upload for shrinking. Click the "+" button to add another file to the list. The files you upload will be condensed into a single file and compressed. Dragging items to change their order will change the order they appear in the download file.

ShrinkSafe

What is ShrinkSafe? What makes it "safe"?

ShrinkSafe is a JavaScript "compression" system. It can typically reduce the size of your scripts by a third or more, depending on your programming style.

Many other tools also shrink JavaScript files, but ShrinkSafe is different. Instead of relying on brittle regular expressions, ShrinkSafe is based on Rhino, a JavaScript interpreter. This allows ShrinkSafe to transform the source of a file with much more confidence that the resulting script will function identically to the file you uploaded.

Best of all, ShrinkSafe will never change a public variable or API. That means that you can drop the compressed version of your JavaScript into your pages without changing the code that uses it.

Why do I need it?

If you don't work with a lot of JavaScript, odds are you don't need ShrinkSafe. If, on the other hand, you're pushing browsers or building an amazing "Web 2.0" user experience, ShrinkSafe can make your pages respond faster by reducing the number of HTTP requests needed and by decreasing the size of the files served.

Perceived speed is real speed for web apps, and ShrinkSafe helps make your apps feel even better. Without the worry.

If I'm Using Dojo, Do I Need ShrinkSafe?

Nope. Dojo's build system trasparently uses ShrinkSafe to ensure that Dojo packs as much punch for its size as possible. If you're using other scripts in your Dojo app, they might benefit from ShrinkSafe, though.

Can I Download ShrinkSafe?

You bet! This is an Open Source project, after all. We've even written up an article covering the system in enough gorey detail to get you up-and-running with ShrinkSafe on your system.

The experienced or impatient can just grab the latest version of the Jar file from dojo subversion.