Websites & SEO

What is browser caching?

Browser caching tells a visitor's browser to keep copies of files such as images, stylesheets and scripts for a set time, so the next page or the next visit loads them from the device instead of downloading them again.

How it works

The server sends cache headers with each file, for example Cache-Control: max-age=2592000 for 30 days. The browser stores the file and reuses it until it expires. Combined with server-side and CDN caching, this makes repeat visits feel almost instant.

The catch: updates that do not appear

If a stylesheet is cached for 30 days and you change it, returning visitors may keep the old version. The fix is versioned file names or query strings (style.css?v=2), which developers change whenever a file changes, so the browser fetches the new one.

Questions, answered

Your browser or a CDN is serving a cached copy. A hard refresh shows the new version; versioned file names fix it for every visitor.

Usually for a short time or not at all in the browser, so content changes appear quickly; images, fonts and versioned scripts can be cached for months.

By the Stegnor team · Updated