AlgoPlusAlgoPlus
AlgoPlus//web / http-caching
Read the theory

HTTP Caching

How the browser avoids re-downloading things — a cache between browser and server, kept fresh by Cache-Control, ETags, and 304s.

Step
Saved by cache
Legend
Active in this exchange
Cache fresh
Cache stale
AI Tutor Workspace
In a nutshell
HTTP caching lets the browser skip downloads it doesn't need. The first request misses the cache and the server returns 200 with the file, a Cache-Control: max-age (how long the copy stays fresh) and an ETag (a fingerprint of the content). While fresh, repeat requests are served straight from the cache with zero network. Once stale, the browser revalidates with If-None-Match: <etag>; if nothing changed the server replies 304 Not Modified with no body, so the cached copy is reused and only a few header bytes cross the wire instead of the whole file.
Ready
Press play to begin the cinematic walkthrough.
Don't fetch what you already have. A cache between the browser and the server keeps past responses; while a copy is still fresh the browser reuses it with no network at all, and even when it's stale it asks 'has this changed?' instead of blindly re-downloading.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for HTTP Caching.