RSS Amplifier

Jens Oliver Meiert · On Craft and Responsibility · Jul 19, 2026

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

0
Sign in to vote or save

meiert.com

Published on Jul 20, 2026, filed under tools, development, html, performance, optimization. (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 (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.)

Read the original on meiert.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.