0

Browsers are known to cache HTTP resources to save bandwidth and improve performance. I’m not 100% sure about how HTTP cache works in web browsers but I can see sometimes that an object with “cache-control” header with a value of “max-age=3600” (1h), meaning that this object will be cached for 1h in the browser’s cache storage.

However, the domain name in the url of this object has a TTL in its DNS record of only 300s. So if I revisit the website again after more than 300s but within 1h of the last visit, the browser will lookup the domain again since the DNS record is expired. Will the browser also clear the caches associated with that expired domain?

1
  • Unfortunately, questions about protocols above OSI layer-4 are off-topic here. You could try to ask this question on Server Fault for a business network.
    – Ron Maupin
    Commented Jul 29, 2020 at 22:03

1 Answer 1

1

No, these two caches and the associated expiration times are unrelated.

2
  • Thank for the prompt answer. So if the HTTP cached recourses will be reused and unrelated to DNS caches, then why would I see the browser causes new DNS resolutions for domains associated with cached HTTP resources that are still valid? In other words, if a cached HTTP resource is still valid, why would the browser need to issue a DNS query for the domain hosting the resource again when I hit reload button?
    – wgq23ggee
    Commented Jul 29, 2020 at 19:21
  • @wgq23ggee Sorry, layers above the transport layer and applications themselves are explicitly off-topic here.
    – Zac67
    Commented Jul 29, 2020 at 19:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.