Skip to content
faresweb.net labs Main blog

labs / experience

Web Site Optimization - Minify HTML

legacy updated: 2013-01-10 reading: 1 min

Legacy note: archived and kept for reference.

Compacting HTML code, including any inline JavaScript and CSS contained in it, can save many bytes of data and speed up downloading, parsing, and execution time.

Minifying HTML has the same benefits as those for minifying CSS and JS: reducing network latency, enhancing compression, and faster browser loading and execution. Moreover, HTML frequently contains inline JS code (in <script> tags) and inline CSS (in <style> tags), so it is useful to minify these as well.