diff options
| author | Owen Jacobson <owen@grimoire.ca> | 2025-12-02 02:35:39 -0500 |
|---|---|---|
| committer | Owen Jacobson <owen@grimoire.ca> | 2025-12-02 14:11:36 -0500 |
| commit | a2285c0e91063cf0f07637664c6055acdcacd9a8 (patch) | |
| tree | 39bb7e26fa7c2861394c5602f10d63deef65c70b /src/expire.rs | |
| parent | 7ff4b80fa320c418a7bdca8007765dc0e6b0bda0 (diff) | |
Ask clients to avoid re-requesting immutable assets for 90 days.
Immutable assets include compiled script chunks, as well as stylesheets, fonts, and images baked into the SvelteKit app bundle. They do _not_ include the service worker, the PWA manifest, or the version and environment JSON files that SvelteKit uses to configure the application on startup.
This complements Pilcrow's `If-None-Modified` support: if a browser asks but has a cached copy locally, we use the `If-Not-Modified` header to detect that and send back a response instructing the client to use that copy, saving bandwidth but not round trips. This change instructs clients not to even try asking, if they're willing to cache the response, and to instead satisfy those assets entirely from cache, saving round trips.
`Duration::from_hours` was added in Rust 1.91, so this change also includes a minimum Rust version bump.
Diffstat (limited to 'src/expire.rs')
0 files changed, 0 insertions, 0 deletions
