Start a new topic

Improving WordPress Site performance using Prefetching and Prerendering

What is Prefetching?

Domain Name Servers (DNS) are the network of servers that your browsers use to find the server that hosts the website you asked it to show you. This means that before the browser can start loading, and then rendering the site, they have to find it.

But, if your browser already had resolved the DNS server, it can skip this part of the process, making the time to page load that much faster. This process is called DNS prefetching, because when a link is clicked, or entered into the address bar, the DNS server has been prefetched.

This technique, which modern browsers do a lot of in the background. For example, generally browsers will prefetching the DNS records for the top search results on a search results page. You can also manually specify the domains to prefetch,.

Each domain that prefetching is implemented for adds a small amount of bandwidth to the request, but in general it’s worth the trade-off.

What is Prerendering?

DNS prefetching just shortens the latency before starting to load a site. Your browser still has to load the site for a link that you have done DNS prefetching for. prerendering on the other hand actually starts the process of rendering specific sites, after the current page has finished loading, but before a link to the pre-rendered site has been clicked.

Prerendering is more resource intensive than DNS prefetching. On the other hand, when a prerendered link is clicked, the benefit is greater.

Like DNS prefetching, many browsers dynamically select content to pre-render, but you can also manually specify pages to prerender. Prerendering, also has more limited support than prefetching, but is still fairly well adopted.

Use WordPress Instant ArticlesWordPress Instant Articles is a relatively new, free plugin that manages prerendering and prefetching for you. It provides you with two very useful implementations of these two technologies.

Login or Signup to post a comment