Instant Navigations: How to Use the Speculation Rules API for Near-Zero Load Times
webdev•Jan 7, 2026

Instant Navigations: How to Use the Speculation Rules API for Near-Zero Load Times

What if the browser could predict where the user's going next and start loading that page before they click? Chrome's Speculation Rules API does just that, enabling 0ms load times.

devTo

devTo

Original source

Key summary

Chrome's Speculation Rules API allows developers to predict user behavior and start loading pages before they click, achieving 0ms load times. The API provides two strategies: prefetching and prerendering, which can be customized with JSON configurations.

TL;DR

  • Chrome's Speculation Rules API predicts user behavior and loads pages before they click.
  • Two strategies: prefetching and prerendering.
  • Prefetching downloads just the HTML document.
  • Prerendering loads everything in a hidden background tab.
  • Speculation rules eliminate perceived wait time.
  • Rules are defined in a <script type="speculationrules"> tag with a JSON configuration.
  • API provides flexibility and control over page loading.

This content is automatically summarized using AI. For full context, always refer to the original article.

Related posts

Subscribe For New Content Updates

By becoming a member of our blog, you have access to articles and content.