The fetch()ening

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

htmx users face a future, non-urgent migration from 2.0 to 4.0 as fetch() replaces XMLHttpRequest, with 2.0 supported indefinitely.

Read this as

htmx is a small JavaScript library that lets web pages update themselves using simple HTML attributes instead of heavy code. Its creator, Carson Gross, announced a future version 4.0 that will replace an older browser technology (XMLHttpRequest) with a newer one (fetch), which forces breaking changes. He promised never to break htmx 2.0, so instead of a version 3, htmx is skipping straight to 4.0. Existing users can stay on version 2.0 forever, and the rollout will be gradual over years.

Teams using htmx 2.0 face an upgrade project when version 4.0 arrives, though no timeline is given. The vendor offers three mitigations: perpetual support for 2.0, extensions restoring old behaviors like implicit attribute inheritance, and a multi-year rollout where 2.x remains the default. The business risk is low and deferrable; there is no cost, pricing or deadline stated, and no competitor context in the article.

htmx 4.0 replaces XMLHttpRequest with fetch(), whose differences in error handling and response streaming force a major version bump; the maintainers are using it to clean accumulated design warts. Breaking changes include removing the implicit attribute inheritance model, with extensions planned to revert some 4.0 behavior to 2.0 semantics. htmx 2.x will remain 'latest' while 4.x ships as 'next' over a multi-year period, and 2.0 is supported in perpetuity. No dates or benchmark figures are given.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

htmx htmx 2.0 htmx 4.0 XMLHttpRequest fetch() intercooler.js Carson Gross

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading