How Chrome Edge Firefox Safari Clears DNS Cache
How to Clear Your Browser's DNS Cache (Chrome, Firefox, Safari)
Chrome Chromium Edge Firefox Safari clear DNS Cache, flush DNS cache
Please visit the original link: https://sysin.org/blog/clear-browser-dns-cache/ to view the latest version. Original works, please keep the source for reprinting.
Author homepage: sysin.org
There are only three (mainstream) browsers left in the world:
- Apple Safari
- Mozilla Firefox
- Google Chrome (Chromium) [foreign various (Microsoft Edge, Opera...), domestic various...]
download:
- Firefox 110, Chrome 110, Chromium 110 official website offline download (macOS, Linux, Windows)
- Apple Safari 16.5 - macOS exclusive browser (independent installation package download)
For normal users, closing and reopening the browser will usually flush the DNS cache. If you switch hosts during web debugging, you need to quickly clear the DNS cache of the browser. The method is as follows:
Google Chrome (including Chromium and its distributions)
For Chrome or Chromium, enter in the address bar chrome://net-internals/#dns
and press Enter, click Clear host cache
to finish:
The above methods generally work on Chromium distributions as well.
For example, Microsoft's Chromium distribution version Edge, input in the address bar chrome://net-internals/#dns
, will be automatically converted into a similar address: edge://net-internals/#dns
.
The above addresses can be saved to the "Favorites" / "Bookmarks Bar" and click to open quickly.
Mozilla Firefox
Enter in the Firefox address bar about:networking#dns
, press Enter, and click "Clear DNS Cache":
The above addresses can be added to "bookmarks" and clicked to open them quickly.
Firefox had several extensions that were very convenient before, but unfortunately they are all offline (sysin):
Supplement: How to disable DNS cache in Firefox :
Enter in the address bar: about:config
, press Enter, "Accept the risk and continue", and then search network.dnsCache
, the following 3 items appear:
network.dnsCacheEntries 400
network.dnsCacheExpiration 60
network.dnsCacheExpirationGracePeriod 60
Just change the value to 0.
Notice:
- Modified to disable DNS cache (sysin).
- This operation may have a certain impact on the web browsing experience and is only used for debugging.
Apple Safari
Menu bar "Safari browser" --> "Preferences..." --> "Advanced", "Show the "Develop" menu in the menu bar.
At this point, click on the menu bar "Development" --> "Empty Cache" (screenshot omitted).
The above operations are also usually used in conjunction with flushing the DNS cache at the operating system level.