Speculation Rules

plugin banner

Uses the Speculation Rules API to prerender linked URLs upon hover by default.

Author:WordPress Performance Team (profile at wordpress.org)
WordPress version required:6.4
WordPress version tested:6.5.2
Plugin version:1.2.2
Added to WordPress repository:19-01-2024
Last updated:19-04-2024
Rating, %:100
Rated by:10
Plugin URI:https://github.com/WordPress/performance/tree...
Total downloads:32 701
Active installs:10 000+
plugin download
Click to start download

This plugin adds support for the Speculation Rules API, which allows defining rules by which certain URLs are dynamically prefetched or prerendered based on user interaction.

See the Speculation Rules WICG specification draft.

By default, the plugin is configured to prerender WordPress frontend URLs when the user hovers over a relevant link. This can be customized via the “Speculative Loading” section under Settings > Reading.

A filter can be used to exclude certain URL paths from being eligible for prefetching and prerendering (see FAQ section). Alternatively, you can add the ‘no-prerender’ CSS class to any link (<a> tag) that should not be prerendered. See FAQ for more information.

Browser support

The Speculation Rules API is a new web API, and the functionality used by the plugin is supported in Chromium-based browsers such as Chrome, Edge, or Opera using version 121 or above. Other browsers such as Safari and Firefox will ignore the functionality with no ill effects but will not benefit from the speculative loading. Note that extensions may disable preloading by default (for example, uBlock Origin does this).

Other browsers will not see any adverse effects, however the feature will not work for those clients.

This plugin was formerly known as Speculation Rules.


FAQ
ChangeLog