Jens Oliver Meiert

Use my latest work: latest tech book · latest non-tech book · latest optimization tool · latest defense tool

5 Ways to Reduce HTML File Size on Your Website, Step 0

Published on Apr 16, 2025, filed under , , , , . (Share this post, e.g., on Mastodon.)

This is one of 180 articles that you can also read in an ebook: On Web Development II.

Anna Monus of DebugBear wrote about 5 Ways to Reduce HTML File Size on Your Website. Strangely, or interestingly, the most immediate way is missing:

Remove the HTML that isn’t needed, i.e., all optional HTML. *

What is optional HTML? Optional start and end tags, optional quotes, and attribute value defaults. Optional HTML: Everything You Need to Know provides an overview.

Why omit optional HTML? As Anna says, to reduce HTML file size and improve performance; you find a similar argument in HTML and Performance: Leave Out Optional Tags and Quotes.

It’s not a popular practice, but that doesn’t change the fact that omitting optional HTML is quite literally a valid performance optimization measure, and a pillar of writing minimal HTML.

If this is your first visit on this website, welcome! I write a lot about HTML optimization, meaning HTML that is valid (error-free), semantic, accessible, and minimal.

* I like to focus this on optional HTML, but another opportunity to reduce HTML file size lies in validation. This is because erroneous HTML code may be code that can be removed. And because we know that large commercial websites usually come with validation and therefore conformance issues, this has become an actual performance optimization vector.

About Me

Portrait sketch of Jens Oliver Meiert.

I’m Jens (long: Jens Oliver Meiert), and I’m an engineering lead, guerrilla philosopher, and indie publisher. I’ve worked as a technical lead and engineering manager at various companies (e.g., Google); I’m an active web and tool developer (code optimization, digital defense), a contributor to web standards (like HTML, CSS, WCAG), and a book author (O’Reilly, Frontend Dogma).

I love trying things—in web development and engineering management, but also in politics and philosophy, where I hold to one idea in particular: that we can only be well if we take good care of everyone. Here on meiert.com I talk about some of my perspectives and experiences. (Interpret charitably but be critical—and share feedback and advice that makes my work better.)