HTTP Caching in Production: Cache-Control, ETags, stale-while-revalidate, and CDNs
Learn to make HTTP's own cache work for you: Cache-Control (max-age, s-maxage, immutable, stale-while-revalidate), ETags and conditional requests with 304, the hashed-assets vs always-revalidating HTML pattern, the Vary header, and CDN caching with invalidation and targeted headers. Expanded edition: Age and freshness arithmetic, weak ETags and Last-Modified, optimistic concurrency with If-Match and 412, cache keys and normalization, cache poisoning and cache deception, Authorization and signed URLs, request collapsing and micro-caching, surrogate keys, inside the browser cache (bfcache), service workers with Workbox, brotli and zstd, GraphQL and persisted queries, observability and header tests, systematic debugging, Next.js and ISR, 103 Early Hints, images and negotiation, Varnish and grace mode, a full case study, FAQ, and glossary. With production-ready code in FastAPI, Express, and nginx.
Verificando acceso...