What is browser caching?

Browser caching is when a visitor’s browser stores copies of a site’s files, such as images, fonts and scripts, so repeat visits and later pages load without downloading them again.

Want to know where your site stands on browser caching?

I’ll test your site on a real mid-range phone profile and send you the two or three fixes that matter most, free.

No newsletter. Just what you asked for, from me. Privacy

In plain English

The server attaches instructions to each file saying how long the browser may keep it. A logo might be cached for a year. A page’s HTML might be checked every visit. These instructions live in the Cache-Control header.

The trick is pairing long cache times with filenames that change whenever the file changes, often a short hash like main.a3f9.js. The browser keeps the old one forever, and a new deploy simply points to a new name.

Why it matters for a small business

Most enquiries come after someone views several pages. If every page re-downloads the same fonts and scripts, the second and third page feel as slow as the first. Good caching makes moving around the site feel instant, which keeps people reading.

An example

A Regina law firm updates its office hours, but some visitors keep seeing the old hours for days. The stylesheet and HTML were cached for a week with no versioning. Setting HTML to revalidate on each visit and fingerprinting the static files fixes both freshness and speed.

Common mistakes

Where I see browser caching go wrong most often.

  1. Setting long cache times on files whose names never change, so updates get stuck.

  2. Disabling caching entirely to avoid stale content, which makes every page load slower.

  3. Testing changes in your own browser without a hard refresh and assuming the update failed.

FAQ

Browser caching, answered

  1. Fingerprinted assets like scripts, styles and images can safely be cached for a year. HTML usually should be revalidated so content stays current.

  2. Do a hard refresh, open a private window, or clear the site’s data in browser settings.

Keep reading

Let’s begin

Let’s build something you’re proud to share.

Let’s Talk