htmx 4.0.0 ships with fetch()-based core and explicit attribute inheritance
The htmx team released version 4.0.0 after eight months of development, rewriting the library's internals to use the fetch() API instead of XMLHttpRequest. Key user-facing changes include making attribute inheritance explicit by default, standardizing event names, and dropping localStorage as the default for history support. The team is not marking 4.0 as 'latest' on NPM, keeping 2.x as the default for CDN users until early 2027 while 4.0 becomes the 'next' line.
GoKawiil's interpretation of the reporting above, not reported fact.
The rewrite modernizes htmx's foundation for async JavaScript while preserving near-total backward compatibility, reflecting a deliberate strategy to avoid disrupting the many sites relying on unversioned CDN links. The cautious rollout plan signals htmx's philosophy of stability for what it calls '100-year web services,' contrasting with faster-breaking release cycles common in JS frameworks.
- htmx 4.0.0 replaces XMLHttpRequest internals with the fetch() API after an 8-month rewrite.
- Major changes include explicit attribute inheritance, cleaned-up event names, and no default localStorage use for history.
- htmx 2.x remains 'latest' on NPM until early 2027 to protect users on unversioned CDN links, even though the website will promote 4.0.
Hypermedia Systems (book by Carson Gross, Adam Stepinski, Deniz Akşimşek) — Written by htmx creator Carson Gross and collaborators, this is the definitive guide to the hypermedia-driven approach that htmx is built around. If the 4.0.0 release has you curious about building 100-year web services without a heavy JS framework, this book walks through the ideas and patterns behind it.
See Hypermedia Systems (book by Carson Gross, Adam Stepinski, Deniz Akşimşek) on Amazon → Affiliate link — we may earn a commission on purchases, at no extra cost to you. Product picked by AI based on this article; it is not a tested recommendation.Source: four.htmx.org — Big Sky Software, 2026-08-28
Published there as: “Htmx 4.0.0 has been released”
Read the original report → The summary and analysis above are GoKawiil's own, written from reporting by the source above. Facts and quotes belong to the original publisher.