v144 · performance
Speculation Rules: prerender-until-script Action
This extends speculation rules to introduce a new action called prerender_until_script.
concepts
-
Until Script
A new `until` mode for speculation rules — prerender activates only after the user takes a script-triggered action (button click, search submission).
-
Search-as-you-type Prerender
A search box that rewrites a speculationrules <script> on each keystroke, prerendering the top hit and waiting for navigator.activatePrerender() before swap.
-
Checkout Warmup
Multi-step form pattern: warm the final “confirm” page from step one, refine the speculation per step, then activate the instant the user submits. Full timeline of warmed vs activated.
-
Timing Dashboard
Side-by-side TTFB / LCP bar chart comparing navigation with and without prerender active. Tracks prerender phases (injected → warming → ready) and reads real
PerformanceNavigationTimingdata.
why it shipped
The Speculation Rules API provides developers with powerful tools for speeding up navigations, including prefetch for fetching a document and prerender for fully rendering it.