Speculation Rules API (Prerendering & Prefetching)
The Speculation Rules API is a JSON-based web standard that lets Chromium browsers load target pages in the background before a click, either as a plain prefetch of the HTML response or as full prerendering including rendering and JavaScript execution in an invisible tab. It is controlled through <script type="speculationrules"> or an HTTP header. It supersedes the older, Chrome-only link rel="prerender", and for navigations Chrome likewise recommends speculation rules over link rel="prefetch", because prefetching whole documents that way caused problems. That does not retire link rel="prefetch" altogether: for prefetching subresources it remains the recommended mechanism. Navigation to pre-loaded pages feels practically instant to users, because the server response and rendering are already finished before the click. At present only Chrome and Edge support the API fully; in other browsers it is a harmless progressive enhancement without Baseline status.
In practice
For websites with clear user paths (an article overview leading to a detail page, or a category leading to a product page, for example), it is worth using to bring perceived load times close to zero. Pages with forms, basket actions, log-out links or personalised content have to be excluded explicitly through "where" conditions, because prerendering can otherwise trigger unwanted side effects on the server. The eagerness setting ("immediate", "eager", "moderate", "conservative") controls how aggressively the browser speculates: immediate loads straight away, eager after roughly ten milliseconds of hover, moderate after roughly 200 milliseconds of hover, and conservative only on pointer down or touchstart. For most SME websites, "moderate" is a good compromise between speed and server load. In common content management systems the implementation often runs through a plugin or a manual snippet in the head, and it should be tested in the Chrome DevTools "Application" panel. Because the effect is limited to Chromium browsers, treat the API as a supplement to classic performance work, not a replacement for it.
← Back to the glossary