v151 · loading · speculation rules
Speculation rules: form_submission field
Ordinary prerenders can only be activated by ordinary navigations — a form submission, which carries special state and runs extra checks, could never match one. The form_submission field on a prerender speculation rule tells the browser to prepare the prerender as a form submission, so a real form submission (for example a search form's GET navigation) can activate it.
The Chrome 151 milestone listing records this feature Enabled by default, and Chromium's runtime feature PrerenderActivationByFormSubmission is marked stable at trunk (it was an origin trial from Chrome 146). The feature detail, updated 2026-06-16, still reports status text “Proposed” and no public position from Firefox or Safari — so the field should be treated as Chrome-only for now. There is no direct client-side feature-detection API for this JSON member; use progressive enhancement and validate real prerender activation rather than treating script insertion as support proof.
at a glance
| Milestone listing | Chrome 151 — Enabled by default |
|---|---|
| Feature detail | Desktop 151, status text “Proposed” (updated 2026-06-16); ship stage (intent 5) desktop_first 151; origin trial stage (intent 3) desktop_first 146 |
| Surface | A JSON field inside <script type="speculationrules"> — not a JavaScript API |
| Field type | Boolean. The open PR discards prefetch rules that specify it; a non-boolean value discards the individual rule and the user agent may warn in the console. |
| Runtime flag | PrerenderActivationByFormSubmission (status stable at trunk; crbug.com/346555939) |
| Standards body | WICG nav-speculation PR #426 (spec-previews diff of prerendering.html) |
| ChromeStatus | 5074313831120896 — Speculation rules: form_submission field |
Syntax
The field lives inside a prerender rule in a <script type="speculationrules"> block. Per the open PR's spec-preview diff of prerendering.html, the rule parser accepts a form_submission member only when its value is a boolean; for a non-boolean value, the user agent may report a console warning and the individual rule parser returns null. The explainer says the intended form-submission use is restricted to list rules (explicit urls) because document rules match links, not submit buttons. However, the current open PR diff parses the member generically and propagates it through the predicate/document-rule candidate path; it does not visibly add a list-only rejection. Treat that as unresolved proposal text, not a settled parser guarantee.
// Two prerendered candidates: one prepared as a form submission, one ordinary.
// A navigation that matches the parameters activates the matching one.
{
"prerender": [
{
"form_submission": true,
"urls": ["/expect_form_submission.html"]
},
{
"urls": ["/not_expect_form_submission.html"]
}
]
}
Source: WICG form_submission explainer — example; spec-previews diff — parse a speculation rule
| Aspect | Contract |
|---|---|
| Where it lives | A member of a prerender speculation rule inside <script type="speculationrules"> |
| Value type | Boolean; a non-boolean value discards the individual rule and may produce a console warning |
| Rule kinds | The explainer intends list rules (urls) because document rules match links rather than submit buttons. The open PR diff currently propagates the member through its predicate path, so list-only parser enforcement is not yet settled. |
Effect when true | The browser prepares the prerender as a form submission, so a real form-submission navigation can activate it |
| What it does NOT do | It does not trigger the speculation itself — the page decides when to speculate (hover the submit button, pause after typing, or a form-specific point) |
| Eligibility | Preparing as a form submission lets the browser run the form-action/CSP checks up front, avoiding wasted prerenders on ineligible pages |
Why it exists
Prerendering loads a page before the user navigates so the navigation is instant. But form submissions are special navigations: they carry state ordinary navigations lack, and at least Chrome runs extra checks on them that a prerendered page never went through. So a prerender prepared the ordinary way can never be activated by a form submission — and without an eligibility check, the browser could waste resources prerendering a page CSP would reject anyway (via form-action). Developers asked for this specifically for search-style GET forms (crbug.com/346555939). The proposal addresses both halves: a candidate marked for form submission can run the additional eligibility checks while being prepared, and a later form submission can activate it only if the browser created and retained an eligible prerender and the activation navigation matches.
Prefetch rules are unaffected: prefetch only downloads HTML without starting a navigation, so form navigations already work without this field.
Source: WICG form_submission explainer — problem & motivationExamples
form_submission field and inspect the JSON. Source: chrome-platform-showcase// Simple GET search form: decide WHEN to speculate yourself.
// `debounce` is an application helper, omitted here for brevity.
const form = document.querySelector("#search");
let rulesScript;
function speculate() {
// Build the same URL this simple GET form will submit, including its query.
const target = new URL(form.action, location.href);
target.search = new URLSearchParams(new FormData(form));
rulesScript?.remove(); // replace the old candidate instead of accumulating rules
rulesScript = document.createElement("script");
rulesScript.type = "speculationrules";
rulesScript.textContent = JSON.stringify({
prerender: [{ form_submission: true, urls: [target.href] }]
});
document.head.appendChild(rulesScript);
}
form.querySelector("input").addEventListener("input", debounce(speculate, 300));
// Submission can activate only if an eligible prerender was created, retained,
// and matches the eventual form navigation.
Source: WICG form_submission explainer — example & triggering guidance; chrome.dev prerender GET-form demo
Browser compatibility
There is no browser-compat-data (BCD) entry for this field (BCD's html/elements/script.json covers speculationrules but not form_submission, checked 2026-07-25), so the table below is an interim view built from ChromeStatus ship data and public signals — not from BCD.
| Browser | Status | Notes |
|---|---|---|
| Chrome | 151 (enabled by default listing) | Feature detail records desktop 151 and Android 151 with status text “Proposed” (updated 2026-06-16); origin-trial stage began at 146; runtime feature is stable at trunk |
| Edge | Not separately reported | No Edge position is recorded on ChromeStatus; no public support evidence (Chromium engine equivalence is not a support commitment) |
| Firefox | No signal | Recorded on ChromeStatus (ff_views = 5) |
| Safari | No signal | Recorded on ChromeStatus (safari_views = 5) |
Web developers: “In development” is recorded on ChromeStatus (web_dev_views = 2).
Source: chromestatus.com/feature/5074313831120896; mdn/browser-compat-data — html/elements/script.jsonSpecifications
| Specification | Status |
|---|---|
| WICG nav-speculation PR #426 — form_submission | Open, unmerged proposal (verified 2026-07-25); its spec-preview diff is not published normative text |
| Speculation Rules | WICG draft (incubation) — the base rules syntax this field extends |
| WICG form_submission explainer | Explainer (proposal evidence, not normative text) |
See also
- WICG — Speculation Rules form submission explainer
- WICG nav-speculation issue #322 — initial proposal
- crbug.com/346555939 — developer request for GET-form prerendering
- chrome.dev — prerender GET-form demo
- Design doc (Google Docs)
- Chrome Platform Showcase — Speculation rules: form_submission field (also: feature detect)