WordPress Speculation Rules Dynamic Prefetching and Prerendering

The WordPress Speculation Rules Plugin introduces support for the Speculation Rules API, enabling the definition of rules that dynamically prefetch or prerender specific URLs based on user interactions. Using WordPress Speculation Rules Plugin will improve your website’s user experience by intelligently prefetching and prerendering URLs based on user interactions.

Key Features of WordPress Speculation Rules Plugin:

Speculation Rules API Integration:

Integrates with the Speculation Rules API, allowing users to define rules for dynamic prefetching and prerendering of URLs based on user interactions.

Customizable Prerendering for WordPress Frontend URLs:

By default, the plugin is set to prerender WordPress frontend URLs when users hover over relevant links. Tailor this behavior according to your preferences through the “Speculation Rules” section found under Settings > Reading.

Flexible Exclusion of URLs:

Use a filter to exclude specific URL paths from eligibility for prefetching and prerendering. Alternatively, add the ‘no-prerender’ CSS class to any link (<a> tag) that should not undergo prerendering.

The Speculation Rules API is a cutting-edge web API, and the plugin’s specific syntax currently requires the use of Chrome 121+ for optimal functionality. While other browsers won’t experience adverse effects, it’s important to note that this feature may not work on those clients.

Also Read:  How to Add Contact Form in WordPress

How to Install Speculation Rules Plugin on WordPress Website

Login to your WordPress admin dashboard. (wp-admin/login).
In your WordPress admin dashboard click plugins and select Add New.
Type Speculation Rules in the search field and press the enter key.
Click the Install Now button in Speculation Rules plugin by WordPress Performance Team.
After the successful installation click the activate Plugin link to activate Speculation Rules.

WordPress Speculation Rules

You can also download and install Speculation Rules WordPress Plugin manually from the below download link.

Download Speculation Rules

Go to Plugins-> Add New-> Upload Plugin and upload the downloaded plugin .zip file and install.

You don’t need to do anything. It will automatically add the required options

If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.



Leave a Reply