Minify JS

Javascript Minify Online

The Javascript files are one of the biggest threats to your page loading speed. Thousand of lines of javascript are sent to the client browsers. First, every browser downloads the scripts and executes them. This process is slow, but the minification of the js files can improve it. The minification or the compressing process is a straightforward but effective way to reduce the loading time.

The minification steps are:

  1. Remove all comments
  2. Remove all whitespaces and collapse the lines into a single one
  3. Shortened the name of the variables, also known as uglified process
In the end, the minified javascript is hard to read by humans, but it is much faster.

The recommendation is to use a regular javascript file in the development environment and a minified one in the production environment.

This JavaScript minifier uses the NUglify library under the hood.