Further Reading

In my investigation, I discovered coding patterns that prevented YUI Compressor from performing variable name replacement. By modifying or avoiding these coding patterns, you can improve the YUI Compressor’s performance.

Better JavaScript Minification

Running your JavaScript code through YUI Compressor results in tremendous savings by default, but there are things you can do to increase the byte savings even further.

Helping the YUI Compressor

A minifier removes the comments and unnecessary whitespace from a program. Depending on how the program is written, this can reduce the size by about half. An obfuscator also minifies, but it will also make modifications to the program, changing the names of variables, functions, and members, making the program much harder to understand, and further reducing its size in the bargain.

Minification vs Obfuscation

When we talk of style here, we are not talking about fads and fashions, nor are we talking about CSS or conventions of layout or typography. We are talking about timeless qualities of expression which can substantially increase the value of a codebase. For companies whose valuations are are inextricably bound to their codebases, style should be a vital concern.

The Elements of JavaScript Style [ Part 1 | Part 2 ]

FAQs

Why did you make this?
Not everyone is comfortable with command line interfaces or deployment pipelines. This just makes it easy if you don't have a system set up.
Do you make a copy of my code?
No. Code entered into this site is not stored anywhere. The source for this site is on GitHub at gpbmike/refresh-sf.

Changelog

April 21, 2016
  • Bump clean-css version to 3.4.12.
November 12, 2015
  • Bump clean-css version to 3.4.7.
December 22, 2014
  • HTML Minify options.
December 7, 2014
  • Bumped Ember and Bootstrap versions.
  • Add UglifyJS 2 options.
  • Add Clean-CSS options.
October 30, 2014
  • Bumped Ember and Bootstrap versions.
  • Disable HTML minification when using YUI Compressor.
August 19, 2014
May 20, 2014
  • Use processImport : false setting for clean-css.
  • Add anonymous gist creation button.
April 17, 2014 (Version 2)
  • Covert to UglifyJS 2 and Clean-CSS on Node.js
  • Separate frontend from compression API
  • Design overhaul
May 18, 2012
  • changed to YUI Compressor 2.4.8
February 23, 2012
  • Concat JS
  • Fix CSS linebreak option
February 18, 2012
  • Use Twitter Bootstrap for UI
  • Remember options using localStorage
  • Use name of uploaded/linked file in download name.
November 28, 2011
  • changed to YUI Compressor 2.4.7
June 13, 2011
  • added gzip download option
April 29, 2011
  • changed to YUI compressor 2.4.6
  • fixed character encoding on download link
  • added label for redirect link
March 6, 2011
  • Added option to add file by URL.
February 28, 2011
  • Finally wrote that cron job to purge old files.
October 25, 2010
  • Escape output of input.
October 6, 2010
  • Added the multiple attribute to the file input field
September 3, 2010
  • changed to YUI compressor 2.4.4
April 22, 2010
  • Use the php class I wrote for the yui compressor.
  • Privacy 'policy'
December 13, 2009
  • Download compressed file.
May 30, 2009
  • jump to output after compression
  • upload multiple files
March 10, 2009
  • fix multi-byte character handling. (thanks Alex)
January 18, 2009
  • changed to YUI compressor 2.4.2
  • added line-break option
  • added verbose option
November 7, 2008
  • changed to YUI Compressor 2.4.1
  • added some links to further reading
  • fixed utf-8 encoding
October 7, 2008
  • valid HTML markup for kicks
October 4, 2008
  • added error reporting
  • escape compressed code
October 2, 2008
  • changed to YUI Compressor 2.3.6
  • stopped escaping double quotes
  • hide command