Jens Oliver Meiert

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

HTML Minifier Next: JSON Schema, Cache Statistics, Default Config File

Published on Jul 20, 2026, filed under , , , , . (Share this post, e.g., on Mastodon.)

HTML Minifier Next (HMN), the official successor to HTML Minifier (and competitive web page minifier), received a number of updates since switching to ESM-only with version 7. Here are three that may be of particular interest:

JSON Schema

HMN now ships a JSON Schema for its configuration files. Referencing it via $schema in your html-minifier-next.config.json gives you editor validation, autocomplete, and inline documentation for every option—so you can write config files without switching back and forth to the HMN README.

Cache Statistics

If you want to tweak HMN’s CSS, JavaScript, or SVG minification caches, --verbose and --dry now print a one-line-per-cache summary at the end of a run, e.g.:

Cache stats:
  CSS cache: 812 hits, 34 misses, 46/500 entries
  JS cache: 120 hits, 118 misses, 118/500 entries

This lets you see at a glance whether caching is actually paying off for your build, without adding any instrumentation yourself. A high hit rate (like the CSS cache above) confirms the cache is doing its job—if a cache is near 1:1 hits-to-misses instead, your inline blocks are mostly unique and caching isn’t helping much, and if entries sits at the limit, raising cacheCSS/cacheJS/cacheSVG may recover more hits.

Default Config File

You no longer need to pass --config-file explicitly: if an html-minifier-next.config.json (or htmlminifier.config.json) file sits in your working directory, HMN picks it up automatically, reporting which file it used on STDERR. This allows you to keep a project-local config file and a shorter CLI invocation—an explicit --config-file still overrides it when you need that.

_ On top of this, HMN ships with additional fixes, security improvements, and performance optimizations, all of which are detailed in the changelog.

As always, if you run into an issue or have a suggestion, please file an issue, and if you or your organization get a lot of value of this work on HTML Minifier Next, please support the project financially. Thank you!

About Me

Jens Oliver Meiert, on March 2, 2026.

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, including Google; I’m an open-source developer and a contributor to web standards (like HTML, CSS, WCAG); and I write and review books for O’Reilly and Frontend Dogma.

I love trying things, not only in web development and engineering management, but also with respect to politics and philosophy. Here on meiert.com I talk about some of my experiences and perspectives. (Please share feedbackinterpret charitably, keep it friendly, but do be critical.)