docs(changelog): static revalidation is a breaking change (CARD-15, D12)
CI / dco (pull_request) Successful in 4s
CI / runtimes (bun) (pull_request) Successful in 19s
CI / build (pull_request) Successful in 29s
CI / runtimes (edge) (pull_request) Successful in 19s
CI / runtimes (deno) (pull_request) Successful in 33s

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 <diego.resendez@zero-oneit.com>
This commit is contained in:
chrnx committed 2026-10-24 14:08:37 -05:00
1 parent bb3d759f3a
commit a2f905fa30
1 file changed
+7 -6
+7 -6
View File
@@ -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/"<size>-<mtime>"`), `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/"<size>-<mtime>"`), `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`.