“Clear your cache” is the most given and least useful advice, because there is no such thing as the cache. There are at least three, kept in different places for different reasons, and clearing the wrong one changes nothing. Worse: clearing all three every time loses you sessions and teaches you nothing.
This article does not teach you to install any cache. It teaches you to find out which of the three is guilty, which takes half a minute, and only then to clear that one.
The three, and what each one keeps
| Which |
Where it lives |
What it keeps |
| The browser’s |
On your computer or phone, inside the browser. |
Page files: images, stylesheets, scripts. The usual culprit when the text changed and the look did not, or when it is only wrong for you. |
| The computer’s DNS cache |
In the operating system, and also in the router and at the provider. |
Names, not pages. It remembers which IP address each domain points to. It only matters when you moved server or nameservers. |
| The site’s |
On the server, in the caching plugin, and in whatever sits in front (a CDN). |
Pages already built, so they need not be built again. The culprit when the old content shows up for everybody. |
The thirty-second test
Two things separate the three with no tools at all: a private window and a phone on mobile data, with Wi-Fi off. The private window does not use the normal browser cache; the phone on mobile data is a different computer, a different DNS cache and a different network.
| What you see |
Who is guilty |
| Private window shows the new one, the normal window the old one |
The browser cache. Section below. |
| Every browser on the computer shows the old one, but the phone on mobile data shows the new one |
The DNS cache of the computer or the network, if what changed was the address. If the address did not change, suspect a proxy on that network. |
| Everything shows the old one, everywhere, for everyone |
The site cache, or whatever sits in front of it. |
| Everything shows the old one and no cache is installed at all |
Then it is not cache: the change was not saved, or it was saved somewhere else. |
1. The browser’s
| 1 |
For a single page, and this is nearly always enough: Ctrl+F5 on Windows and Linux, Cmd+Shift+R on Mac. It reloads ignoring what was stored.
|
|
| 2 |
To check without clearing anything, open the same page in a private window. If it is correct there, the site is fine and the problem is only yours.
|
|
| 3 |
To clear it properly, go into the browser settings, to the section that deletes browsing data, and select only cached images and files.
|
|
|
Do not clear everything out of habit. Include the cookies and you are signed out everywhere, on every site, including the accounts whose password you no longer remember. To see an updated page, a private window is enough.
|
2. The computer’s DNS cache
This one only matters after you change where the domain points: new server, new nameservers, an edited record. If none of that changed, do not waste time here.
| System |
Command |
| Windows |
ipconfig /flushdns, in a Command Prompt opened as administrator. |
| macOS |
sudo dscacheutil -flushcache and then sudo killall -HUP mDNSResponder. |
| Linux |
Depends on the system. With systemd-resolved, resolvectl flush-caches. |
Clearing yours does not clear the rest of the world’s. Every DNS record has a TTL, which says how long everyone else may keep the old answer, and there is no way to hurry it. The two articles that explain this are DNS records explained and how long propagation takes.
|
Close and reopen the browser after clearing. Browsers keep a name cache of their own, independent of the system’s, and that one only empties when the program is fully closed.
|
3. The site’s
If the old content shows for everybody, the site stored the page already built. The order you clear in matters, because there are layers:
| 3 |
Check afterwards in a private window. Checking in the browser you have been working in proves nothing, because that one has a cache of its own.
|
|
|
If you have to empty the cache after every single change, a setting is wrong. A properly configured cache notices the page changed. If it does not, either the plugin is not integrated with whatever edits your pages, or there are two caching plugins at once, which is the combination that causes the most damage.
|
There is a fourth one, and it is off by default. PHP can keep your code already compiled, through the opcache extension. It is present on your account but not active: you only have it if you switched it on in “Select PHP Version” in cPanel. If you did, and a change to a .php file takes a moment to show, you know where to look.
|
When it is not cache at all
| Symptom |
What it really is |
| You edited and it does not show even in a private window |
The change was not saved, or it was saved somewhere else (another domain, another folder, a staging site). |
| Another site’s page shows up, or a list of files |
That is where the domain points, not cache. See seeing the site before the domain points here. |
| The site is slow but up to date |
No cache fixes a page that is slow to build. See the site is slow. |
| It is the social media preview that is stale |
That is their cache, and it clears differently: the wrong preview. |
|
Cleared all three and still seeing the old one? Tell us the address and what should appear.
Open a support ticket
|
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from $10.00/mo See plans |