How to Clear DNS Cache on Chrome, Firefox and Safari.
To reduce unnecessary DNS lookups, our computers and even our browsers keep cached copies of DNS records. Although they are updated or refreshed at regular intervals, it may be necessary to manually clear the DNS cache so that earlier cached resolutions can be removed and subsequent lookups based on the new DNS settings.
In this article, we’ll take a look at how to clear the DNS cache in your browser. When you exit the browser and restart it, the DNS cache is automatically cleared. Here’s how you can do this in the browser itself without closing or reopening it.
Read: How to Clear DNS Cache on Windows, macOS, Android and iOS
1. Chrome Clear DNS Cache
Once you’ve opened or worked on Chrome, here’s how to do it in Chrome.
Open a new tab and in the address bar enter the address: chrome: // net-internals / # dns
This should take you to a page that looks something like this, which shows everything about the stored DNS records.
Click “Clear Host Cache”.
Then you may need to clear the socket pools. For this
Open another new tab. Enter the address: chrome: // net-internals / # sockets.
This should lead you to a similar page with cached socket pools.
Click Flush Outlet Pools.
You are good to go.
2. Firefox Clear the DNS cache
The process is almost the same as Firefox, except that we need to change the value of two variables called network.dnsCacheExpiration and network.dnsCacheExpirationGracePeriod, instead of pressing a single button.
Open a new tab
Enter the address: about: config
You should see a warning page.
Click “I take the risk!”
Then you should be on a page with various Firefox variables and a search engine at the top.
Search for “network.dnsCacheExpiration”.
Two results should appear on the screen, namely network.dnsCacheExpiration and network.dnsCacheExpirationGracePeriod with values of 60.
Now double-click the part of the value that says 60 and set it to 0.
Then reset both values to 60 again.
Both of these variables basically store the TTL, or time to live, or essentially the expiration time for the DNS record, which is set to 60 by default. By changing it to 0, we ask Firefox to immediately clear the DNS cache, and then we need to reset it back to default.
If you don’t have these variables, don’t worry, just create two new integer variables with the same names and set the values to 60, which are the default values, and follow the instructions above.
Right click to create integer variable
Set the value
3. Safari Flush DNS cache
In Safari, we can clear the cache using an option or even a shortcut. But first, we need to enable the Develop menu in the menu bar.
In Safari, go to Settings.
Press Command +,
Go to the Advanced section.
Check the option “Show design menu on menu bar”
You should now have a new design option on the menu bar.
Go to development. Click on “Empty Caches” or simply do it with the keyboard shortcut Option + Command + E
4. Opera clear the DNS cache
Clearing the DNS cache in Opera is very similar to clearing it in Chrome, except for the address; instead of “chrome” there will be “opera”.
Open a new tab in Opera and enter the address: opera: // net-internals / # dns
Click “Clear Host Cache” to clear the DNS cache.
You also need to clear the socket pool by clicking the sockets tab or
Enter the address: opera: // net-internals / # sockets and click on Flush Socket Pools.
When flushing the DNS cache from the system using the command line or terminal, most of the work we have to remember is that most browsers (eg Internet Explorer does not) also store a cache of DNS records and they must also be flushed for proper cleaning. So these were the ways to reset the DNS cache in various browsers.
Read: Best DNS Servers for Speed, Stability, and Security