
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.
AI Snips
Chapters
Transcript
Episode notes
Preloading Improves Perceived Speed
- The Speculation Rules API lets browsers "cheat" by loading likely-next pages earlier to improve perceived speed.
- Preloading moves the work earlier, making pages appear faster without changing core load times.
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.
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.
