Caching

KASH-ingnoun

Topic: Building and running a site

  1. Storing a copy of something so that it can be shown again quickly, instead of being rebuilt or downloaded afresh each time.
  2. Browsers cache images and files so that pages load faster on a second visit. Servers can cache pages too, so that a busy shop does not have to rebuild the same page for every visitor. The downside is that a visitor can sometimes see an old version of a page after you have changed it. Refreshing the page without the cache (Ctrl and F5 on most computers) usually fixes it, and developers add version numbers to files so that browsers fetch the new ones.

Example He still saw the old banner until he cleared his browser cache.

Quick fix: reload the page without the cache

Most of the time you only need to reload the one page and ignore the stored copy. This is called a hard refresh. On some laptops the function keys need the Fn key held down as well.

Hard refresh shortcuts
BrowserWindows, Linux and ChromebookMac
Chrome, Edge and BraveCtrl + F5 or Ctrl + Shift + RCmd + Shift + R
FirefoxCtrl + F5 or Ctrl + Shift + RCmd + Shift + R
OperaCtrl + F5 or Ctrl + Shift + RCmd + Shift + R
SafariSafari is for Apple devices onlyHold Shift and click the reload button, or press Cmd + Option + E and then Cmd + R. The Develop menu must be switched on in Safari Settings, under Advanced.

Clear everything the browser has stored

If a hard refresh does not help, or the whole site looks out of date, open the clear-data window. In it, choose “Cached images and files” and a time range. Leave cookies and passwords unticked unless you want to be signed out of sites.

Shortcuts to open the clear-data window
BrowserWindows, Linux and ChromebookMac
Chrome, Edge, Brave and OperaCtrl + Shift + DeleteCmd + Shift + Delete
FirefoxCtrl + Shift + DeleteCmd + Shift + Delete
SafariSafari is for Apple devices onlyCmd + Option + E empties the cache. Or open Safari Settings (Cmd + ,), then Privacy, then Manage Website Data.

On a phone or tablet

There are no keyboard shortcuts, so you use the settings instead.

  • iPhone and iPad (Safari): open Settings, find Safari (under Apps on newer versions of iOS) and tap Clear History and Website Data. This also signs you out of sites.
  • Android (Chrome): tap the three dots, then History, then Clear browsing data, and choose cached images and files.

Still looking old?

Open the page in a private window, which starts with an empty cache. The shortcut is Ctrl + Shift + N in Chrome and Edge, Ctrl + Shift + P in Firefox, and on a Mac Cmd + Shift + N in Chrome, Edge and Safari or Cmd + Shift + P in Firefox. If the new version shows there but not in your normal window, it is your own browser cache. If it looks old everywhere, the copy is probably stored on the server or in a hosting layer, or a recent DNS change has not finished spreading, and the person who looks after the site can clear it.

For developers

With the developer tools open (F12, or Cmd + Option + I on a Mac), right-click the reload button in Chrome or Edge and choose Empty Cache and Hard Reload. Ticking “Disable cache” in the Network tab does the same for as long as the tools stay open.

See also Core Web Vitals WebP Hosting

← All terms

Want a website built around the way you sell?

We have been building websites since 1997 and we are happy to talk through your plans, whatever stage you are at.