labs · jsjuicer web edition · 2007

JSJuicer Web Edition

JSJuicer was a JavaScript packer written in C++ by Adrian Johnston and released under a BSD-style licence. It ran from the command line, which meant downloading and compiling it first. The Labs page put it behind a web form instead: paste a script, choose what to strip, and copy the smaller result.

What it did

The web edition offered the packer's options as checkboxes:

  • strip comments;
  • strip debug lines starting with ;;;;
  • safely remove unneeded whitespace and control characters;
  • obfuscate symbols starting with $;
  • inject a comment of your own into the output.

The ;;; convention is the clever part. Debugging lines started with three semicolons, which JavaScript reads as empty statements, so they ran normally in development and the packer could delete them for production in one pass.

What it saved

The blog post that introduced it reports two tests. Smoothbox went from 11K to 7.1K. MooTools 1.0 with every plugin went from 140K to 60K. Both still worked afterwards, as long as obfuscation stayed off; in those tests, the obfuscation option broke the code. Version 1.1, out on 13 March 2007, learned to leave Internet Explorer's conditional comments alone, and the web edition was updated the same day.

What replaced it

Minification is no longer a separate step anyone thinks about. Build tools such as esbuild, Terser and SWC shrink code as part of every production build, rename local variables safely, and write source maps so the browser's debugger can still show the original. Servers then compress the result with gzip or Brotli.

The ;;; trick has a direct descendant too. Code wrapped in a development-only check, such as if (import.meta.env.DEV), is removed from production bundles automatically, and most minifiers can drop console calls with a single setting.

Where it is now

The form itself is not rebuilt here, since it relied on the packer running on the old server. JSJuicer's own home page was hosted on googlepages.com, a Google service that no longer exists, and no current copy of the tool turned up in a 2026 search.

labs/jsjuicer/index.htmllast modified 13 March 2007

JSJuicer Web Edition

Core script from Adrian Johnston, BSD-Style licence

Last modified: 2007/03/13 (upgraded with Adrian's version 1.1)

Source code

Strip comments

Strip debug code starting with ";;;"

Safely remove unneeded whitespace and control characters

Obfuscate symbols starting with "$"

Inject comment :

Output code

The labels of the original form, captured on 3 April 2009. The text areas and checkboxes are not reproduced.