WordPress Releases A Performance Plugin For “Near-Instant Load Times”

WordPress Releases A Performance Plugin For “Near-Instant Load Times”

Introduction:

WordPress recently introduced an official plugin designed to enhance site performance by leveraging a technology known as speculative loading. This cutting-edge technology aims to expedite webpage loading times and improve the overall user experience for site visitors.

Speculative Loading :

Rendering involves the construction of an entire webpage for instant display. When your browser downloads HTML, images, and other resources and assembles them into a webpage, it’s called rendering. Prerendering involves assembling the webpage in the background.

This plugin enables the browser to prerender the entire webpage that a user might navigate to next. By anticipating the user’s next move based on their hover interactions, the plugin triggers the prerendering process.

According to Chrome, prerendering should occur only when there’s at least an 80% probability of the user navigating to another webpage. The official Chrome support page for prerendering explains:

“Pages should only be prerendered when there is a high probability the page will be loaded by the user. This is why the Chrome address bar prerendering options only happen when there is such a high probability (greater than 80% of the time). There is also a caveat on that same developer page that prerendering may not happen based on user settings, memory usage, and other scenarios.”
The Speculative Loading API resolves a problem that previous solutions couldn’t address. Previous solutions only prefetch resources like JavaScript and CSS, but did not prerender the entire webpage.

The official WordPress announcement describes the Speculation Rules API as follows:

“Introducing the Speculation Rules API. The Speculation Rules API is a new web API that solves the above problems. It allows defining rules to dynamically prefetch and/or prerender URLs of a certain structure based on user interaction, in JSON syntax—or in other words, speculatively preload those URLs before navigation.”

WordPress Releases A Performance Plugin For “Near-Instant Load Times”

The WordPress plugin adds support for the Speculation Rules API. The Mozilla developer pages describe it as follows:


“The Speculation Rules API is designed to improve performance for future navigations. It targets document URLs rather than specific resource files, making it suitable for multi-page applications (MPAs) rather than single-page applications (SPAs). The Speculation Rules API provides an alternative to the widely-available <link rel=”prefetch”> feature and is designed to supersede the Chrome-only deprecated <link rel=”prerender”> feature. It offers many improvements over these technologies, along with a more expressive, configurable syntax for specifying which documents should be prefetched or prerendered.”

Performance Lab Plugin

Developed by the official WordPress performance team, the new plugin is part of their ongoing efforts to introduce performance-enhancing technologies. The plugin is set to prerender “WordPress frontend URLs” by default, including pages, posts, and archive pages. Users can fine-tune its functionality under:


Settings > Reading > Speculative Loading

Browser Compatibility

While the Speculative API is supported by Chrome 108, the specific rules used by the new plugin require Chrome 121 or higher. Browsers that do not support the API will simply ignore the plugin without affecting the user experience.

Analytics and Prerendering

A WordPress developer raised a question regarding how Analytics would handle prerendering. It was clarified that Analytics providers need to detect prerenders and not count them as page loads or site visits. Both Google Analytics and Google Publisher Tags (GPT) are capable of handling prerenders. According to the Chrome developers support page:


“Google Analytics handles prerender by default as of September 2023, and Google Publisher Tag (GPT) made a similar change to delay triggering advertisements until activation as of November 2023.”

Potential Conflicts with Ad Blockers

It’s important to note that this plugin, being an experimental feature, may not work with browsers using the uBlock Origin ad-blocking browser extension.

Conclusion

WordPress users interested in optimizing site performance can now download the Speculative Loading Plugin developed by the official WordPress Performance Team.

Leave a Reply

Your email address will not be published.

© Intentify Media Group