Minification can be distinguished from the more general concept of data compression in that the minified source can be interpreted immediately without the need for an uncompression step: the same interpreter can work with both the original as well as with the minified source.
In 2003 Douglas Crockford introduced tool JSMin, which only removed comments and whitespace. It was followed by YUI Compressor shortly thereafter. In 2009, Google opened up its Closure toolkit, including Closure Compiler which contained a source mapping feature together with a Firefox extension called Closure Inspector. In 2010, Mihai Bazon introduced UglifyJS, which was superseded by UglifyJS2 in 2012; the rewrite was to allow for source map support.
Source maps allow tools to display unminified code from minified code with an optimized "mapping" between them. The original format was created by Joseph Schorr as part of the Closure Inspector minification project. Updates as versions 2 and 3 reduced the size of the map files.
Components and libraries for Web applications and websites have been developed to optimize file requests and quicken page load times by reducing the size of various files.
Some libraries also merge multiple script files into a single file for client download. This fosters a modular approach to development.
- JSMin. Crockford.com (4 December 2003).
- "minification · concepts · WPD · WebPlatform.org". docs.webplatform.org. Retrieved 2016-04-11.
- Bazon, Mihai. "Should you switch to UglifyJS2?". lisperator.net. Retrieved 2016-04-11.
- "Source Map Revision 3 Proposal". Google Docs. Retrieved 2016-04-16.
- Microsoft Ajax Minifier. Ajaxmin.codeplex.com (13 September 2012).
- Pretty Diff. Pretty Diff.
- minifyPS. Minifyps.codeplex.com (22 February 2012).
- Online JS Minify
- BlimptonTech. BlimptonTech.com (17 July 2013).