Back to Developer Roadmap

Minify HTML

src/data/best-practices/frontend-performance/content/minify-html.md

4.0722 B
Original Source

Minify HTML

The HTML code is minified, comments, white spaces and new lines are removed from production files.

Removing all unnecessary spaces, comments and attributes will reduce the size of your HTML and speed up your site's page load times and obviously lighten the download for your user.

Most of the frameworks have plugins to facilitate the minification of the webpages. You can use a bunch of NPM modules that can do the job for you automatically.