← Blog 5 min read

Speculation Rules: Faster Pages Before You Click

Speculation Rules: Faster Pages Before You Click

Some pages seem to open the instant you click. That speed may come from more than a fast connection. A site can give the browser a set of hints about where you are likely to navigate next, allowing it to fetch or even prepare a page before you choose the link. The modern mechanism for this is called the Speculation Rules API.

Used carefully, speculation can remove waiting without changing your destination. Used too aggressively, it can consume bandwidth and contact sites you never intended to visit. The browser therefore plays an active role in deciding whether a suggested action is appropriate.

What speculation rules tell the browser

A website can include a small JSON rule set that identifies possible future navigations. The rules may list exact URLs or describe matching links in the current document. They can also express “eagerness,” indicating how strongly the site expects a navigation.

The browser treats these rules as suggestions, not commands. It may ignore, delay, or cancel them based on network conditions, device resources, user settings, and implementation limits. The Chrome guide to prerendering describes eagerness levels ranging from conservative interaction-based preparation to more immediate speculation.

This newer system is more structured than scattering traditional preload hints across a page. It gives the browser context about a likely navigation and lets developers exclude sensitive paths such as account actions, shopping-cart operations, or administrative pages.

Prefetching and prerendering are not the same

Speculation rules can describe two main kinds of preparation. Prefetching retrieves the document and keeps the response ready for a possible navigation. Prerendering goes further by loading the page in a hidden state, including much of the work needed to display it. If you activate that page, the prepared document can appear almost immediately.

Neither action is identical to an ordinary visible visit. A prerendered page is subject to restrictions, and some operations are delayed until activation. Browsers also constrain which destinations can be prepared and under what credentials or origin relationships.

The current work is split across the HTML speculative-loading model and the WICG navigation speculation specifications. Because the technology continues to develop, behavior and support vary between browsers.

The privacy issue: contact before intent

A normal navigation contacts a destination after you click. Prefetching can make a request beforehand. That request may reveal an IP address, timing information, referrer details, and other ordinary network metadata to the destination even if you never follow the link.

This is why cross-origin speculation needs particular care. Same-origin preparation stays within the site you are already visiting, while cross-origin prefetching can contact another organization. Modern designs can use isolated storage or IP-protection measures in some circumstances, but those protections are not identical across browsers and configurations.

Cookies matter too. A credentialed request can be personalised and may affect server-side state if a site handles requests incorrectly. Developers should never put destructive or state-changing actions behind ordinary GET links, whether speculation is used or not.

How browsers keep prerendering contained

Browsers place restrictions on hidden prerendered pages because the page has not yet earned the same standing as an activated tab. Capabilities that require user attention or a gesture should not quietly appear from the hidden state. A page may also be discarded if it violates a restriction, uses too many resources, or no longer looks like a likely destination.

Cross-origin prerendering is more limited than same-origin prerendering. Chrome’s documentation, for example, describes explicit opt-in requirements for certain same-site, cross-origin cases. Speculations are also restricted to navigation within the same tab in current implementations.

These boundaries complement the privacy principles behind referrer controls and third-party cookie protections. No single mechanism covers every signal; the browser must consider origin, credentials, storage, network exposure, and user settings together.

Faster does not always mean better

Preparing every visible link would be wasteful. It could download large pages on a metered connection, increase battery use, load content that quickly becomes stale, and add traffic to servers for pages nobody reads. Good speculation is selective.

Conservative rules can wait for a pointer-down or other strong signal. Moderate behavior may begin after a short hover or a mobile viewport heuristic. More eager rules are suited only to destinations with a genuinely high probability of use. Browsers can still decline the work when saving data or resources matters more.

Site owners should exclude logout URLs, purchases, form submissions, account changes, and highly personalised flows. They should measure whether a rule actually improves navigation and avoid treating every possible click as inevitable.

What users can do

Most people do not need to manage individual speculation rules. The browser is responsible for evaluating them. Still, a few choices shape the balance:

  • Use data-saving or preload controls when bandwidth is limited.
  • Keep browser protections current so newer speculation safeguards are applied.
  • Use tracker blocking to reduce unrelated cross-site requests.
  • Remember that clearing site data may also clear cached speculative content, depending on the browser.
  • Prefer browsers that explain performance features without hiding privacy trade-offs.

Speculation Rules can make the web feel remarkably immediate, but speed should remain subordinate to intent. The healthiest model is a cautious prediction: prepare a genuinely likely page, keep the work contained, and let the user’s click decide whether the navigation becomes real.

Browse with more intention

Noorani brings prayer times, Qibla, tracker blocking, and privacy into one calm desktop browser built for how Muslims live online.

Download Noorani