F5 and Ctrl+F5 are not the same thing; I cleared all four layers of cache one by one

Last month, the time my home router was hacked (I wrote about the entire investigation< a href="https://www.shunot.com/en/192-168-1-1/1038.html"> a complete article), DNS changed to 'wild server,' and an ad popped up in the bottom right corner of the webpage. I upgraded the router's firmware, changed the password, and set the DNS back to 223.5.5.5. The computer was clean on the spot. My wife's phone was still bouncing. Same WiFi, one good, one broken. I fiddled with her phone until 10 p.m. before I realized: she never checked web pages in her browser, only opened them in WeChat chat boxes—the built-in browser stored old DNS records and web pages in her own warehouse. No matter how clean the router was, it wouldn't ask.
1. First, distinguish: the webpage is 'old' and which layer is old
Many people treat 'showing old content on a webpage' as a thing, but in reality, from the moment you click the URL to the page pops up, there are four layers of content in between that may be 'old,' and the cleaning methods vary. First, understand this chart clearly; everything else will be easier:
| Which layer | isstored and | whatis old | ? How to clear |
|---|---|---|---|
| Browser DNS cache, | domain name cache, any IP | you point to—others can open it, but if you open old pages | ,you can force or clear browser data |
| The system DNS cache | is the same as above. The whole computer shares one copy | .After replacing the DNS command, the command line still returns the old IP | ipconfig /flushdns |
| web file cache. | Images, styles, scripts are cached locally | ,and the page content or layout is the old | Ctrl+ F5 or clearing browsing data |
| Jump memory | 301 for permanent redirects and HTTPS | memoryto keep jumping to old domains, and HTTPS | toclear 'website data' |
Pressing F5 repeatedly only touches part of the third layer; the remaining three layers are completely useless. That's why some people refresh their phones dozens of times and restart their phones, but the page is still outdated—they pressed the wrong floor.
2. Why browsers store old web pages: It's not laziness, it's to save data
I once conducted an experiment on my own blog. The homepage is fully loaded with 1.6MB, with a total of 89 requests. The first cold opening takes just over 4 seconds; Close and reopen tabs, and it appears in 0.6 seconds. Opening F12 to check the Network panel, out of 89 requests, over 80 Size sections say from disk cache—the browser didn't even go to the server to get it, just used the data stored on the hard drive.
This system has two tiers. The first tier is called strong caching, which can be understood as the shelf life: when the server sends files, it casually says, "Don't come back for this batch of images for three months" (Cache-Control and max-age in the response header), and the browser safely stores them. If you access them again within the shelf life, they won't even ask the server. The second level is called negotiated caching. After the expiration date, the browser takes the version number in hand and asks, "Is my version still valid?" The server checks and shows no change, only restores a 304 status code (meaning "hasn't changed"), and the browser continues to use the local version; Only when things really change do you get back 200, bring new documents.
This design is good for everyday use—saving traffic and driving faster. The problem lies in 'the server side has changed, but your side is still within its shelf life.' The website updated the article, the router changed its DNS, the hijacking was removed, and the local cache was completely unaware of it.
3. Three Tips on the Computer: F5, Ctrl+F5, Incognito Window
I'll rank these three according to how comfortable they are.
F5 is a normal refresh. It only takes the main document seriously, and requests are marked as "verified," but supporting elements like images and styles are likely to continue using caching. So "pressing F5 and it's still the old one" is perfectly normal; it never promised to redo everything.
Ctrl+F5 is the real power to flash (on Mac, it's Cmd+Shift+R). It inserts Cache-Control: no-cache in each request header, re-requests all files from the server, and ignores the local cache. On the F12 panel, you can see a neat row of 200 caches, not a single one from disk cache—that's what you call clean.
The Traceless Window is a mirror that reveals demons. The incognito window starts from scratch without any old cache, so treat it as a "standard answer": the same URL, the incognito window is new, the normal window is old. If it's confirmed as a cache issue, just clear it; The incognito window is also old, so that's not your phone's problem. Either the website hasn't updated itself, or the DNS has been redirected to the usual location, so you have to search the first and second layers.
There's also a hidden file: when the developer tools are open, right-click the browser's refresh button, and the menu will show an option for "Clear cache and force reload"—clear before requesting, even more thorough than Ctrl+F5. When I modify my blog template, I rely on it—just one quick look and a quick look.
4. The most troublesome thing on your phone is WeChat
Here is the answer to my wife's phone. WeChat's built-in browser (the old Android version called the X5 kernel, the new one XWeb) has its own independent cache and is completely different from the system browser. If you clear browser data a hundred times in your phone's settings, the WeChat pages remain the same.
The right way is to go into WeChat and clear it: Go to 'Me'→ 'Settings', 'General'→ → 'Storage Space', wait for it to calculate the cache size (if you save a lot of WeChat, this step takes over ten seconds), then tap 'Clear Cache'. My wife's phone cleared out 1.9GB, then clicked the same link after cleaning, and the ads disappeared. As for the cost: this cleaning only affects the cache, doesn't touch chat history or files, but the login status of the embedded webpage drops along with it. Next time you open the login page in WeChat, you'll have to log in again.
Android has an old trick: send yourself debugx5.qq.com this link in WeChat, click it to access the kernel debugging page, and you can clear the webpage cache separately. The new version of WeChat may not keep this entry point—if you have it, use it; if not, go for the storage space route—don't get stuck on it.
On the mobile browser side: in iOS Safari, go to "Settings" → "Safari browser" → pull down to "Clear History and Website Data"; If you only want to clear cached history, go to "Settings" → "Apps" → "Safari browser" → "Advanced" → "Website Data" → "Remove All Website Data." I recommend this option more because you can save the history for browsing old pages. On Android, Chrome is just three dots on the right side of the address bar→ "History" → "Clear browsing data." For the time range, just select "Last 1 hour." Don't just tap "All Time" and lose all login status stored for months.
5. Lessons from 301 and https: The two most unfair layers
There are two layers of 'old' F5 that are completely useless, because they're not files—they're rules remembered by the browser.
301 is a permanent redirect. When the server says, "This address has been permanently moved," the browser stores the migration record locally. After that, when you enter the old address, the browser simply follows the local record and doesn't bother with the server. Where is the pitfall? The website operator accidentally set up the wrong 301 and then changed it back; the server side had already corrected it, but the old visitor's phone still had the wrong one saved and kept jumping to the wrong location. I used to redirectory a section of my blog, forgot to remove 301 first, and after an afternoon of fussing around, I found that no matter how I changed the new address, it always reverted to the old directory—the wrong entry was recorded in my own browser. Cleanup method: Clear "Website Data" or remove the "cached images and files" box in your browsing data.
HSTS is HTTPS memory. The websites you visit can send a response header to the browser, "From now on, always use HTTPS to connect to me," and the browser will solder you to http:// it will break back https://. This mechanism is a great anti-hijacking feature. I wrote < the article a href="https://www.shunot.com/en/lybk/1117.html"> the difference between http and https, and I also wrote a separate article about troubleshooting login pages forced to jump to https and pitfalls
6. Finishing: Check the symptoms and remove them in a four-step sequence
| Symptoms | don't | work at first |
|---|---|---|
| content and layout are old | Ctrl+F5 to force | clear browser 'cached images and files' |
| Others can open it, but I can't open it / Open the old | incognito window for comparison | Check the DNS layer: take a look at the command line ipconfig /displaydns, then flush DNS |
| to keep up old domains and error pages | clearing "website data" | forincognito verification. Incognito also jumps to the server side |
| WeChat pages from old | WeChat storage space | Copy the link into your system browser to open |
The order is simple: first check (without trace), then force flash (Ctrl+F5), then clear cache, and only activate DNS at the end. The DNS layer is another world. In my article DNS not working, I wrote about three checks. Flushdns manages the system layer; The browser's own DNS cache is not their concern; the two layers need to be cleared separately. If you really want to move to the router side, I've written the modification method by brand: Xiaomi's is here, is on the side of the modem. If you want to fully understand the domain resolution process, check my < a href="https://www.shunot.com/en/lybk/1069.html" > use nslookup to run DNS resolution. The three-layer small notebook structure connects perfectly with this one.
Back to my wife's phone: After clearing the cache on WeChat, it was clean that very night. A couple of days later, she came back to me again, saying that a mall page on the public account couldn't pay for it—this time I learned my lesson and had her copy the link and open it in the system browser. Okay. When it comes to WeChat's core, don't reason with it—switch paths for the fastest way.
