K
K
kumankov2013-02-06 20:48:16
Domain Name System
kumankov, 2013-02-06 20:48:16

DNS caching in iOS

Maybe someone came across:
Do all applications on iOS have a common DNS resolver cache?

Roughly speaking, if Safari accesses lalala.domain.com and DNS returns ip 127.0.0.1, will other applications take this ip from the cache, or will they try to resolve it again by contacting the DNS server?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Isaev, 2013-02-07
@x256

I've run into a situation where my NSURLConnection instance cached the wrong DNS entry (there was a problem with our DNS server), and even when fixed, Safari opened the "correct" site at that URL, my connection still accessed the wrong DNS - entries (maybe not the same IP, or maybe something else). I didn't create my own NSURLCache. Restarting the app didn't help.
As a result: the caching policy for correct and incorrect DNS records may differ, but the fact is: in some cases, “separate” caching exists.

S
Sergey, 2013-02-07
@bondbig

I don't know the answer, but I'm sure yes. To work with the network, a standard stack and a set of OS utilities are probably used, and therefore a system resolver.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question