How Speculative Loading can boost WordPress page speed

How Speculative Loading can boost WordPress page speed

Today, web pages are packed with images, videos, and interactive elements that aim to enhance the user experience. However, these elements can slow down your page’s load time.

As technology advances, one goal remains constant: performance. Everyone hopes for their web pages to load at lightning speeds.

One way to make web pages load faster is to prerender or prefetch them before a user navigates to them.

A brief history of prerendering

In 2011, the Chromium team introduced an early form of prerendering to the Chrome browser through the <link rel="prerender" … > tag.

This allowed developers to hint to browsers which page(s) a user might visit next. The browser would then silently fetch and render these pages in the background, dramatically reducing the load time when the user navigated to those pages.

Despite its benefits, this early implementation of prerendering used a lot of bandwidth and CPU resources and could lead to privacy issues if the user didn’t visit the prerendered pages. Additionally, you had to manually select which links to prerender, which wasn’t always effective or feasible.

To address some of these concerns, Chrome deprecated prerendering using the link rel=prerender hint in favor of the NoState Prefetch method, which involved fetching resources for a page without executing JavaScript or other potentially privacy-invasive actions.

The NoState Prefetch method improved resource loading but could not deliver an instant page load like a full prerender.