Skip to main content

Contact

What are you interested in?

Back to Glossary (C)
Glossary · C

Cache.

A cache is a temporary store that keeps data that has already been loaded or calculated, so that it does not have to be fetched from the server again or regenerated on the next request. For websites, caching means pages load faster and servers carry less load.

Illustration of "Cache": Process in 3 steps: 1st visit → Cache → 2nd visit 1st visit1,8 s01Cachestored022nd visit0,3 s03

Cache — Explained in Detail

Caching happens on several levels of a website at the same time. The browser cache stores images, fonts, stylesheets and scripts locally on the visitor's device; on the second page view, these files do not have to be downloaded again. A CDN keeps copies of the website on servers close to users. On the web server itself there are page, object and database caches that prevent the same page from being reassembled on every request.

Browser and CDN caching is controlled via HTTP headers, above all Cache-Control. A value such as 'max-age=31536000, immutable' tells the browser that a file will remain unchanged for a year, which makes sense for images and scripts with a hash in the file name that receive a new name with every change. HTML pages, by contrast, are usually cached briefly or not at all so that new content is visible immediately. Modern frameworks combine the two: statically generated pages sit ready in the cache and are rebuilt in the background when content changes.

For loading time, caching is one of the biggest levers. A server that delivers a finished page from the cache responds in milliseconds rather than seconds; this improves time to first byte and thus, indirectly, the Core Web Vitals. On WordPress sites, a caching plugin is often the difference between a sluggish and a usable website, though with the risk of plugins getting in each other's way.

The downside is the familiar sentence 'I can't see the change'. If you edit a page and see the old version in your own browser, you are usually looking at a cached copy. A hard reload, a private window or specifically clearing the server or CDN cache solves this. Well-configured caching makes exactly this situation rare, because HTML is cached briefly and static files for a long time.

When to clear the cache

As a visitor: when a website looks strange, forms do not respond or changes do not appear. In the browser, a hard reload (Shift + reload) or opening the page in a private window is usually enough. As a site owner: after a design update, after changes to menus or the footer that appear on every page, and after changing redirects. If you experience cache problems regularly, the answer is not to clear more often but to have the cache rules corrected.

Example: a sale price that does not appear

A bike shop changes the price of a discontinued model on Friday morning. In the shop, the tablet shows the new price; on the customer's phone, the old one is still displayed. The cause: the CDN caches the product page for 24 hours. The solution is a rule that caches HTML pages only briefly or purges them from the cache specifically with every change, while images and fonts continue to be cached for a long time.

How we set up caching for new websites is part of web development; for existing sites, we check the headers in the website audit.

Frequently Asked Questions About Cache

No. Clearing the browser cache only removes cached files, which are loaded again on the next visit. If you also delete cookies, you will be logged out of websites; that is a separate step.

Indirectly. Caching shortens the server response and the loading time, which improves user experience and Core Web Vitals. Google does not assess caching itself, but the speed it produces.

A cache stores files so that a page loads faster. A cookie stores small pieces of information such as a session, a language setting or a consent choice that the website should recognise. The cache is about speed; cookies are about state and recognition.

Ready for Your Project?

Apply this knowledge to your website — DLM Digital will help you.