Harm of browser DNS prefetch read Technology

Source: Internet
Author: User
Tags prefetch

At http://news.ycombinator.com/news, I will see the following article:

Saved 10 billion DNS queries per month by disabling DNS prefetching (pinkbike.com)

Disabling DNS pre-reading can save 10 billion of DNS queries per month

It immediately attracted my attention.

First, the author said that he has recently increased the number of DNS queries by 0.4 billion, forcing him to order a DNS query service worth $1600 per month.

What is DNS pre-read:

DNS prefetching is a fairly recent (added in Safari 7 months ago) enhancement to all the major browsers. after a page loads, the browser looks at all the hosts in the links on the page and in the background proceeds to issue DNS queries to resolve those hostnames.

In order to speed up domain name DNS resolution, the browser will first resolve all links on the webpage.

To prove that the browser pre-read increases the number of DNS queries on the author's website by 800% in a month, the author ruled out other factors that increase the number of DNS queries:

1. DNS ttls

2. Lots of links/images on other sites (leeching by other websites)

3. misconfigured internal services hitting the DNS

Then, the dynect platform is used to obtain a statistical graph of the author's website's DNS data, and then compare it with the number of dynamic web pages generated on the website per second. It is found that there are multiple DNS queries of 120; that is, 120 more DNS queries per second is meaningless.

Then we finally pointed to the browser's DNS pre-access technology.

Then, let's give an example to illustrate a lot of reflections. Finally, we can use Meta to disable DNS pre-storage.

However, I did not check how to set up DNS for the whole website, so I had to check the source code of the author's webpage.

The following code is forbidden: <meta http-equiv = "X-DNS-prefetch-control" content = "off"/> (the author says there is no DNS pre-read behavior in IE8/9 during the test)

However, browser DNS pre-reading actually saves the DNS resolution time when we click the link, which is a speed-up. In addition to the author's website, there are hundreds of comment links.

DNS query is a waste. If a website has no more than dozens of links on a page, you do not need to disable DNS pre-reading.

I just found a lot of interesting comments about this article: http://news.ycombinator.com/item? Id = 2306319

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.