Let a shared cache keep public pages seen signed out (#473)
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
Signed-out GET and HEAD requests for the home page, Explore, the audience and help pages, profiles, and a timeline's page, moments and durations are sent with Cache-Control: public, s-maxage=60, stale-while-revalidate=300 and Vary: Cookie (server/shared-cache.mjs, set by the proxy). A session cookie, an Authorization header or any other page keeps Next.js's private, no-store. Next.js hides the router's payload headers and _rsc from the proxy and replaces any Vary it sets, so a launcher hook (server/shared-response.cjs) keeps payload requests and server errors private and appends Cookie to Vary. A kept page keeps its CSP nonce in both header and scripts, so it still runs. docs/administration.md: what is kept, a sample nginx cache that bypasses on the session cookie (with server_tokens off, #521), and measuring Core Web Vitals with PageSpeed Insights and Lighthouse. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/2cf1ce20f5e0defa155a729e86027880115316c8
Related
Open Let a shared cache keep public pages seen signed out (#473) in the timeline