简体   繁体   中英

Before retrieving each image, will host issue new DNS queries?

I have come across a problem.

A web page contains images. Before retrieving each image, does your host issue new DNS queries?

I have found answers in google. But I got two different answers. Some one think it will( https://maxwellsullivan.wordpress.com/2013/02/28/wireshark-lab-3-dns/ ) while others thinks not( https://maxwellsullivan.wordpress.com/2013/02/28/wireshark-lab-3-dns/ ).

I can not make decision which is right. I hope someone will provide some solid evidence. Thank you!

Generally not, but the answer is usually, "it depends". DNS queries may be cached in any of a number of places:

  • Your browser, or other application making the query.
  • Your operating system
  • Your local network router or dns server
  • Your ISP's nameservers
  • Other internet nameservers

In your case of multiple images on a single page, chrome will cache the dns record and use it for all of them. This question has some details. It looks like chrome will cache for ~30 seconds, and after that expires it will hit your local system resolver, which may have it cached longer depending on your configuration. Only if that fails will it go out over the network and make further DNS requests.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM