Start a project

Tool 183 of 425 · Performance

Speculation Rules Builder

Writes a Speculation Rules document for instant page loads, with list and document rules, safe exclusions and an eagerness setting.

Speculation Rules Builder

Your input

Result

Script tag
JSON only

    01

    What it does

    Writes a Speculation Rules document for instant page loads, with list and document rules, safe exclusions and an eagerness setting.

    • Prerender or prefetch
    • List rules and document rules with href_matches
    • Exclusions for logout and basket URLs
    • Eagerness: immediate, eager, moderate, conservative

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    A speculationrules script and JSON, with a Copy and a Download button on every result.

    • Speculation Rules
    • Prerender
    • Prefetch

    Why it matters

    The Speculation Rules API lets Chrome and Edge prerender the next page before the visitor clicks, so it appears instantly. It replaced the old , which no longer does anything.

    The JSON is easy to get subtly wrong, and prerendering a logout link or counting a pageview for a page nobody saw are real risks. This builder writes the rules and warns about both.

    How to use it

    1. Type or paste your input; the example shows the format.
    2. Press Write rules. Results also update as you type.
    3. Read the summary line, then the table, notes or output below it.
    4. Copy or download what you need. Nothing leaves this page.

    FAQ

    Do Safari and Firefox support it?

    Not yet. Browsers that don't understand speculation rules ignore them, so it is safe to add.

    Is my input uploaded?

    No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.

    Can I rely on the result?

    It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk