Book Image

Responsive Design High Performance

By : Dewald C Els, Dewald Els
Book Image

Responsive Design High Performance

By: Dewald C Els, Dewald Els

Overview of this book

Table of Contents (16 chapters)
Responsive Design High Performance
About the Author
About the Reviewers
Speeding Up Development with Design Concepts, Patterns, and Programs

DNS prefetching

DNS prefetching is a useful technique when your website accesses multiple sites that are on different domains.

Here is a code snippet of a DNS prefetch that is placed in the <head> tags:

<link rel="dns-prefetch" href="">

The purpose of DNS prefetching

DNS prefetching attempts to resolve the domain names before the user follows a link to that domain. If the domain has been resolved, the advantage of this will be that there is effectively no delay due to DNS name resolution.

An excellent example of using DNS prefetching would be for results in a search that link to various other domains. Here are a few types of prefetching:

  • -prefetch: This identifies a resource file, such as an image or a CSS style sheet, to be included in the cache

  • -dns-prefetch: This identifies a DNS query to resolve the background so that requests can occur more quickly

  • -prerender (IE only): This identifies a web page to load in the background, if the user wants to navigate...