Overview

Minification reduces the size of JavaScript, CSS, and HTML files by removing whitespace, comments, and shortening variable names. This results in faster download times and improved page performance.

What is Removed?

  • Whitespace characters (spaces, tabs, newlines).
  • Comments.
  • Block delimiters (where optional).
  • Long variable and function names (replaced with short ones).

Tools

  • Terser: For JavaScript minification.
  • CSSNano: For CSS minification.
  • HTMLMinifier: For HTML minification.

Related Terms