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 browsers history.