Compare Revisions
X-DNS-Prefetch-Control
Revision 976487:
Revision 976487 by hiddo32 on
Revision 1014765:
Revision 1014765 by PushpitaPikuDey on
- Title:
- Controlling DNS prefetching
- Controlling DNS prefetching
- Slug:
- Web/HTTP/Controlling_DNS_prefetching
- Web/HTTP/Controlling_DNS_prefetching
- Tags:
- "DNS" "HTML" "HTTP"
- "DNS" "HTML" "HTTP"
- Content:
-
Revision 976487 Revision 1014765 n 8 <strong>DNS prefetching</strong> is a feature by n 8 <strong>DNS prefetching</strong> is a feature by > which browsers proactively performs domain name resolution on bo > which browsers proactively perform domain name resolution o > th links that the user may choose to follow as well as URLs for i > n both links that the user may choose to follow as well as URLs f > tems referenced by the document, including images, CSS, JavaScrip > or items referenced by the document, including images, CSS, JavaS > t, and so forth. > cript, and so forth. n 11 This prefetching is performed in the background, so that th n 11 This prefetching is performed at the background, so th > e {{glossary("DNS")}} is likely to already have been resolved by > at the {{glossary("DNS")}} is likely to have been resolved by the > the time the referenced items are actually needed. This red > time the referenced items are actually needed. This reduce > uces latency when, for example, the user actually clicks a link. > s latency when the user actually clicks a link. n 17 DNS requests are very small in terms of bandwidth, but late n 17 DNS requests are very small in terms of bandwidth, but late > ncy can be quite high, especially on mobile networks. By sp > ncy can be quite high, especially on mobile networks. By sp > eculatively prefetching DNS results, latency when, for example, t > eculatively prefetching DNS results, latency can be reduced signi > he user clicks a link can be reduced significantly (on the order > ficantly at certain times , for example when the user click > of a second, in some cases). > s on the link.(on the order of a second, in some cases). n 20 The implementation of this prefetching in Firefox allows do n 20 The implementation of this prefetching in Firefox allows &n > main name resolution to occur in parallel with (instead of in ser > bsp;domain name resolution to occur in parallel with (instead of > ial with) the fetching of actual page content. By doing thi > in serial with) the fetching of actual page content. By doi > s, the high latency domain name resolution process doesn't cause > ng this, the high latency domain name resolution process doesn't > delays during the process of fetching content. > cause any delay at the time of the process of fetching > content. n 23 Page load times -- especially on mobile networks -- can be n 23 Page load times -- especially on mobile networks -- can be > measurably improved this way. If the domain names for image > measurably improved in this way. If the domain names > s can be resolved in advance of the images being requested, pages > for images can be resolved in advance of the images being request > that load a number of images can see a load time improvement of > ed, pages that load a number of images can see an improvemen > 5% or more. > t of 5% or more in the time of loading images. n 68 Similarly, the link element can be used to resolve hostname n 68 Similarly, the link element can be used to resolve hostname > s without providing a complete URL, by preceding the hostname wit > s without providing a complete URL, but only, by preceding the ho > h two slashes: > stname with two slashes: t 74 Forced prefetching of hostnames might be useful, for exampl t 74 Forced prefetching of hostnames might be useful, for exampl > e, on the home page of a site to force pre-resolution of domain n > e, on the home page of a site to force pre-resolution of domain n > ames that are referenced frequently throughout the site even thou > ames that are referenced frequently throughout the site even thou > gh they're not used on the home page itself. This will impr > gh they are not used on the home page itself. This will imp > ove overall site performance even though the performance of the h > rove overall performance of site even though the performance of t > ome page may not be affected. > he home page may not be affected.