Chrome DNS Caching

The Problem

Google Chrome has an interesting feature: it maintains its own DNS cache “to improve page load performance”. Whether or not this is a good feature is a debate I’m not terribly interested in, but I have found that it can cause problems if a web site’s DNS changes for whatever reason, so I’ve decided to disable it. It’s a pretty easy change.

I noticed the problem because Radio Paradise upgraded its web servers, in the process changing IP addresses. Chrome has been giving me weird errors on that site recently, and this change only compounded them because I was being oddly redirected. Bill Goldsmith (DJ of said internet radio station) pointed out that it was a problem with Chrome’s DNS caching, a feature I was until that point unaware of. I have been using Chrome since it was made available for public beta, but perhaps Bill’s point that it “may not be ready for prime time” has some truth in it. I do not know if this DNS cache is stored locally, or if Chrome asks Google for cached information.

The Solution

Extremely easy: turn the setting off, and restart Chrome.

  1. In the Tools menu, open Options and go to the Under the Hood tab
  2. Uncheck the option “Use DNS pre-fetching to improve page load performance”, as shown here:  

    Google Chrome Under The Hood Options Tab
    Google Chrome Under The Hood Options Tab
  3. Restart Chrome. Note that you have to close all Chrome tabs, even though they are separate processes, for this setting change to take effect.

Comments

2 responses to “Chrome DNS Caching”

  1. Dan Crosta Avatar
    Dan Crosta

    In fact, many browsers cache DNS information, though not usually for more than a browsing session, as a way to reduce the number of DNS request they have to make. (Why the browsers cache this, rather than letting the system cache it, or why they don’t obey the TTLs on DNS records is beyond me.)

    Andrew and I were looking into this the other day when learning about DNS SRV records, and whether it would be possible to have an SRV specify that HTTP should be reached on a port other than 80. Turns out the DNS protocol supports it, but no major browsers query SRVs. I suspect as a consequence, most sites do not list _tcp._http in their DNS SRV (because nobody asks for it). Chicken, meet egg.

  2. Tom Lenz Avatar
    Tom Lenz

    I had to clear browsing data. (Wrench, options, under the hood)

Nurd Up!