Speculation Rules API

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Speculation Rules API is designed to improve performance for future navigations. It targets document URLs rather than specific resource files, and so makes sense for multi-page applications (MPAs) rather than single-page applications (SPAs).

The Speculation Rules API provides an alternative to the widely-available feature and is designed to supersede the Chrome-only deprecated feature. It provides many improvements over these technologies, along with a more expressive, configurable syntax for specifying which documents should be prefetched or prerendered.

Note: The Speculation Rules API doesn't handle subresource prefetches; for that you'll need to use .

Concepts and usage

Speculation rules using a \n\n

Speculation rules using a