We all love the Google Chrome browser but today I discovered one of its lesser known features – version 1.0 caches DNS locally and never seems to refresh its cache.
Normally the host operating system is responsible for turning symbolic domain names into IP addresses by querying the DNS across the Internet. This typically adds a few milliseconds when you call up a website for the first time. On subsequent visits, the operating systems DNS cache should have remembered the IP address and it will avoid the overhead.
The designers of Chrome are clever. While you are reading a web page Chrome scans the page for domain names and performs DNS lookup’s in the background caching these in its own DNS cache. This means that by the time you’ve read the page and clicked on a link, the DNS cache will already be populated.
Today I discovered this feature after moving a website I’ve been working on over to another web server. I updated the DNS left it a few minutes and then did the old IPCONFIG /flushdns command and then checked the site using various browsers to make sure the site was working properly. No problems in Firefox, IE and Safari but then I tried Chrome and found that it was still pointing to the old server.
After doing some research I found the Options > Under the hood menu and disabled “Use DNS pre-fetching to improve performance”. After doing this you have to close down all your Chrome windows and then start it up again. This seems to clear its DNS cache.
It looks like the current version 1.0 of Chrome does not refresh DNS entries once cached. Hopefully, Google will fix this or add an obvious “Flush DNS cache” option to the menu where you normally delete the browser’s history.