Caching
Caching is storing copies of files or data in a temporary location, such as the browser, a CDN or the server, so they can be delivered faster the next time they are requested.
Without caching, every visit would rebuild and download everything from scratch. Caching keeps ready-made copies close at hand.
In more detail
Browser caching stores files on the visitor’s device, controlled by HTTP headers such as Cache-Control. CDN caching stores copies at edge servers worldwide. Server-side caching stores generated pages or database query results. The challenge is invalidation: making sure visitors get fresh content after updates. Common practice is long cache times for versioned assets, such as CSS files with a hash in the name, and shorter or revalidated caching for HTML.
Why it matters
Good caching dramatically improves TTFB and page speed, reduces server load and costs, and makes repeat visits feel instant.
An online magazine adds page caching and a CDN. Server load falls by 90 percent, and pages that took two seconds to generate now arrive in under 100 milliseconds.