How to Hard Refresh and Clear the Cache (Chrome, Safari, Firefox, Edge)
Changed your site but still seeing the old version? A hard refresh reloads the page while ignoring the cache. The shortcuts for every browser on Mac and Windows, how to clear the cache for one site, why hard refresh sometimes isn't enough, and how to stop users seeing stale versions.
You deployed a change. You reload the page. It looks exactly the same. Nine times out of ten, your browser is showing you a cached copy — a saved version from earlier — instead of fetching the new one.
A hard refresh reloads the page and ignores the cache.
The shortcuts
| Browser | Windows / Linux | Mac |
|---|---|---|
| Chrome | Ctrl + Shift + R (or Ctrl + F5) | Cmd + Shift + R |
| Edge | Ctrl + Shift + R (or Ctrl + F5) | Cmd + Shift + R |
| Firefox | Ctrl + Shift + R (or Ctrl + F5) | Cmd + Shift + R |
| Safari | — | Cmd + Option + R |
On a phone, the simplest route is to close the tab and open the page again, or clear the site's data in the browser settings.
The stronger option in Chrome and Edge
Open DevTools (F12, or Cmd + Option + I on Mac). Now right-click the reload button next to the address bar. You get three options:
- Normal Reload
- Hard Reload
- Empty Cache and Hard Reload — clears the cache for this page and reloads
The last one is the most thorough. (Browser developer tools for beginners)
While DevTools is open, you can also tick Disable cache in the Network tab. Caching stays off for as long as DevTools is open — handy while you're developing.
Clearing the cache for just one site
You don't need to wipe your whole browser history.
- Chrome/Edge: click the icon left of the address bar → Site settings → Delete data.
- Firefox: click the padlock → Clear cookies and site data.
- Safari: Settings → Privacy → Manage Website Data → search for the site → Remove.
This also removes cookies, so you'll be logged out of that site.
Why a hard refresh sometimes isn't enough
If you still see the old version after a hard refresh, the cache is probably somewhere else:
- A CDN like Cloudflare is serving its saved copy. Purge the cache in your CDN's dashboard. (What is a CDN?)
- A service worker (common with PWAs) is serving files offline. In DevTools → Application → Service Workers, click Unregister, then reload. (What is a PWA?)
- The deploy didn't actually happen or deployed the old build. Check your host's deploy log.
- DNS still points to an old server after a move. (DNS propagation)
- You're looking at a different environment — staging vs production. It happens to everyone.
Stopping your users seeing old versions
You can't ask every visitor to hard refresh. Fix it at the source:
- Use hashed file names for JavaScript and CSS (
app.3f9a1c.js). Vite, Next.js and most build tools do this automatically, so each new build gets new file names and browsers fetch them fresh. - Don't cache the HTML page for long. The HTML points to the hashed files; if the HTML is cached, it keeps pointing to old ones. Use
Cache-Control: no-cachefor HTML, long caching for hashed assets. (HTTP caching headers) - Purge the CDN after each deploy if your CDN caches HTML.
The summary
- Hard refresh: Ctrl + Shift + R (Windows) or Cmd + Shift + R (Mac); Safari is Cmd + Option + R.
- In Chrome, DevTools open → right-click reload → Empty Cache and Hard Reload.
- Still stale? Check the CDN, service workers, and whether the deploy really happened.
- Hashed asset names + short HTML caching stop users seeing old versions.
EasySpawn serves your app with sensible caching defaults — hashed assets cached long, HTML kept fresh — so a deploy shows up for everyone straight away. See how it works or join the waitlist.
Related: What Is Caching? · HTTP Caching Headers · React App Shows a Blank Page After Deploying · Why Is My Website Slow?
Keep reading
"ReferenceError: window is not defined" in Next.js: How to Fix It
window, document and localStorage only exist in the browser. Next.js renders components on the server first, where they don't exist. Why it happens, and the fixes: useEffect, 'use client', typeof checks, dynamic imports with ssr: false, and libraries that touch window on import.
"Unexpected Token < in JSON at Position 0": What It Means and How to Fix It
Your code expected JSON and got HTML — almost always an error page or your app's index.html. Why it happens (wrong URL, 404, server error, SPA fallback, login redirect), how to see what the server actually sent, and how to parse responses safely.