Search code examples
browserdnsttla-records

Does a Browser look up DNS on every refresh?


Does a browser lookup DNS every time it makes a request?

Or perhaps it looks at the A-record TTL and follows that directive?

I am wondering if a browser will keep changing site IPS, if the underlying site has multiple IPS which are being served up round-robbin-style by DNS?

RESULTS In addition to the comments below, I've found that Nameservers are where caching strictly occurs, and may or may not occur in your browser/OS. HOWEVER, if you have a site that is infrequently accessed,then you can expect propagation of any changes to occur instantly, since many nameservers will not have queried for your records, and will query the instant they are asked. Basically, the more a site is accessed, the more exact your TTL will work.


Solution

  • A browser should follow the DNS TTL timeouts. (that's exactly the reason they exist)

    That means that if you are using round robin DNS and the record that you are pointing to goes offline, then that client will be offline until the TTL expires. In these situations you should keep a short TTL, and be sure to use a DNS provider with good global coverage.

    (However, I think I read somewhere that Chrome has its own DNS resolver, and breaks those rules in a few places - or I could have imagined that bit!)