demo · v146

Prerender trigger tracer

Type a query, watch the matching algorithm tick through your form_submission speculation rule, and see which target URL gets prerendered (or skipped). Edit the rule, change the form, the URL pattern and the field-name filter to see when the rule kicks in.

The browser's job: scan all forms on the page, match each one against the form_submission rule, then either start a prerender for the would-be submission URL or do nothing. This tracer makes every step explicit.

speculation rule

candidate form

simulate typing

Type a value and press trace.

computed prerender URL

trace

<script type="speculationrules">
{
  "prerender": [{
    "source": "form_submission",
    "if_form_field": ["q"],
    "where": { "href_matches": "/search?*" }
  }]
}
</script>

see also