You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Recognize fingerprinted CSS and font assets for immutable caching in Void Pages #881
A browser can reuse a content-addressed stylesheet or font across page loads. In a Void Pages app where global middleware sends asset requests through the Worker, these files keep Cloudflare’s default revalidation policy. A repeat full load can therefore make another Worker request for each file it revalidates.
What I checked
With void@1.11.0, inspect dist/client/.vite/manifest.json after a production build that imports CSS and emits a font file (for example, a WOFF2 above Vite’s inline limit). Compare the emitted paths in file, css and assets with the union of all immutableFiles lists. In our local build:
Extension
Files referenced
Listed as immutable
JS
176
176
CSS
2
0
WOFF2
29
0
SVG
1
0
The native Cloudflare deployment guide explicitly describes the current CSS behavior. The manifest code explains why it only stamps chunks: a stable output asset name can resemble a hashed name. The Worker consults the stamped paths when applying its immutable response policy.
Request
Extend the policy to emitted CSS, fonts and other assets when the build can establish that their URLs change with their contents. Keep ordinary revalidation for stable filenames, including copied public files, and preserve explicit Cache-Control rules. If the bundler does not expose enough provenance today, an explicit build-time opt-in for known fingerprinted outputs would also help.
This applies even when the Worker intentionally handles the request. Middleware path matching is tracked separately in #808.
Activity