JS Optimizer – Closure Compiler

The following tool helps in JS optimizing(Remove whitespace , comments, identify the unreachable code, useless code)


Add your JS script URL into the text box in the above webapp and click compile.

Original and com size will be shown. The new code is also presented as a new link.

Sample example below

  • ORIGINAL SIZE:697.74KB (160.8KB gzipped)
  • COMPILED SIZE:625.89KB (145.65KB gzipped)

More Reference URLS on the same

  1. User Documentation : https://developers.google.com/closure/
  2. Google Code Page for the Tool: http://code.google.com/p/closure-compiler/
  3. Closure compiler Java JAR Library file for download and commandline execution : http://code.google.com/p/closure-compiler/downloads/list
  4. Example Execution
    • java -jar compiler.jar –compilation_level SIMPLE_OPTIMIZATIONS –js=$tempOriginalFile  –js_output_file=$closureModifiedJsFile

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: