Web development

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.

Example

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.

FAQ

Caching: quick answers

Can caching cause problems?

Yes, if visitors see outdated content. Use versioned file names and sensible cache rules for HTML.

What is browser caching?

Storing files on the visitor's device so they do not need downloading again on the next visit.

Free audit

Find out where you stand in search and AI answers.

Get a free audit of your SEO, AI visibility and email setup. We send a short, specific report with the three changes that would move the needle most.