PodRocket

Speeding up the web with the speculation rules API | Barry Pollard

Nov 6, 2025
Barry Pollard, a Chrome DevRel engineer specializing in web performance, dives into the speculation rules API. He explains how this groundbreaking feature enhances the speed of multi-page and e-commerce sites through prefetching and pre-rendering. Topics include the history of speculative loading, the contrast between SPA and MPA behaviors, and the nuances of conservative prefetch strategies. Barry also discusses the API's adoption by platforms like Shopify and WordPress, potential risks for developers, and performance gains observed from early adopters.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
ADVICE

Prefer Declarative Rules Over Custom Libraries

  • Use the Speculation Rules API to declaratively tell the browser which links to prefetch or pre-render instead of building custom libraries.
  • Prefer rules and browser heuristics for multi-page sites to avoid heavy SPA rewrites.
ADVICE

Add Simple JSON Rules For Speculation

  • Add a <script type="speculationrules"> JSON rule to specify prefetch or pre-render and target links with a where clause.
  • Use eagerness levels (immediate, eager, moderate, conservative) to balance speed and waste.
INSIGHT

Eagerness Tiers Capture User Intent

  • Eagerness tiers map to intent signals: immediate (now), eager, moderate (hover), conservative (mouse-down).
  • Browsers implement timings differently, so heuristics vary across platforms.
Get the Snipd Podcast app to discover more snips from this episode
Get the app