From c8786c3661bc6864cdc6813f0e83ca5e98b5bd4e Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Sat, 24 Oct 2026 13:58:13 -0500 Subject: [PATCH] docs(changelog): static revalidation is a breaking change (CARD-15, D12) Every static file now goes out with `Cache-Control: no-cache`, where before it sent no Cache-Control at all. A browser or proxy that reused static files for a lifetime guessed from `Last-Modified` now revalidates each one, and keeping the old behaviour needs a config change (`static: { cacheControl }`). That is a breaking change, so the entry moves from `### Changed` to `### Breaking`, word for word. D12 had filed it under `### Changed`. CARD-22's gate table already said a breaking entry was due if the default turned on, and it did. The pre-freeze review flagged the mismatch. Signed-off-by: Diego Resendez --- CHANGELOG.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb56c3b..ec2fa9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,6 +99,13 @@ npm treats versions as semver and semver forbids leading zeros. `app.upgrade` already did. An app with no `@Ws`/`@Stream` routes and no mesh attaches no upgrade listener on Node, as before, so there the request still reaches the HTTP route table. +- **Static files are revalidated, not re-downloaded** (#114, D12). Every static hit carries a weak + `ETag` (`W/"-"`), `Last-Modified` and `Cache-Control: no-cache`. A matching + `If-None-Match`, or `If-Modified-Since` when there is no `If-None-Match`, answers `304` from the + file's `stat` without reading it. A `HEAD` no longer reads the file either. `no-cache` stops + browsers from reusing a file for a lifetime they guessed from `Last-Modified`. To keep the old + behaviour, set `static: { cacheControl }` to whatever your proxy expects. + ### Added - **Health probes: `createApp({ health: true })`** (#115). Off by default. `GET`/`HEAD /__live__` @@ -177,12 +184,6 @@ npm treats versions as semver and semver forbids leading zeros. ### Changed -- **Static files are revalidated, not re-downloaded** (#114, D12). Every static hit carries a weak - `ETag` (`W/"-"`), `Last-Modified` and `Cache-Control: no-cache`. A matching - `If-None-Match`, or `If-Modified-Since` when there is no `If-None-Match`, answers `304` from the - file's `stat` without reading it. A `HEAD` no longer reads the file either. `no-cache` stops - browsers from reusing a file for a lifetime they guessed from `Last-Modified`. To keep the old - behaviour, set `static: { cacheControl }` to whatever your proxy expects. - **Every `304` is bodiless** (#114). A `304` has no body and no `content-*` headers on any adapter, including one from `throw new NotModified()`, which used to go out with the default JSON envelope's `content-type`.