demo · v144

Prerender-until-script Simulator

Type a target URL, hit "register rule" — the simulator shows the four stages: insert speculation rule, wait, fire script_action, then activate the prerendered document. The visualizer mirrors what Chrome 144 does behind the scenes.

API present in browser: checking…

1. rule registered
2. waiting on script_action
3. action fired → prerender starts
4. activation → page shown

  

the API

<script type="speculationrules">
{
  "prerender": [{
    "urls": ["/details/42"],
    "until": "script_action"
  }]
}
</script>

// later, in user-gesture handler:
document.prerendering && window.dispatchEvent(new Event('speculation:activate'));
// or simply navigate to the URL via a normal <a> click.

see also