# Speculative load

RUMvision can collect information about speculative loading through the browser's Speculative Load Measurement API. This allows you to see which speculative navigations were started, which one was eventually used, and whether speculative preloads ended up being useful.

> This is an opt-in feature. At the time of writing, [the API](https://github.com/WICG/speculative_load_measurement/) is available through an [Origin Trial](/md/blog/a-step-in-to-the-future-of-the-web-what-are-origin-trials/). During this period, you can enable Speculative Load Measurement under **Experiments** in your [domain's Features section](/md/help-center/settings/domain/features/).

The related dimensions and metrics can be used together to evaluate how effective your [Speculation Rules](/blog/measuring-the-real-world-impact-of-speculation-rules-with-rum/) are in real-world traffic.

Speculation data is collected when the browser exposes this information. As browser support and the underlying API are still evolving, these fields may not be available for every pageview.

## Speculation dimensions

RUMvision currently exposes two dimensions for triggered speculative navigations. These can be used to distinguish different Speculation Rules, strategies and eagerness levels.

### Speculation navigation tags

This dimension contains the tags and strategies associated with speculative navigations that were started by the browser.

When a developer-defined tag is available, RUMvision will expose that tag. The speculation type and eagerness are also represented as a combined value, for example:

```
prerender_until_script:eager
```

A single pageview can contain multiple values. RUMvision may also include a count variant when the same tag or strategy occurred multiple times during that pageview:

```
prerender_until_script+eager
  prerender_until_script+eager:count=3
  prerender_until_script:eager
  prerender_until_script:eager:count=2
```

The value without `:count=` can be used as a regular filter or grouping dimension. The count variant provides additional information about how often that particular tag or strategy occurred within the pageview.

This can be useful when comparing different Speculation Rules. For example, a rule might frequently appear in **Navigation Tags** (`Speculation navigation tags`) while rarely appearing as the actually used speculation.

### Speculation navigation used

This dimension identifies the speculative navigation that matched the user's actual outgoing navigation.

When available, the dimension contains both the developer-defined tag and the corresponding speculation strategy. For example:

```
prerender_until_script+eager
  prerender_until_script:eager
```

This makes it possible to filter specifically on speculative navigations that were actually used rather than merely started by the browser.

The dimension can also contain the following special values:

- **none**  
   The outgoing destination was known, but none of the triggered speculative navigations matched it.
- **unknown**  
   The browser did not expose enough information to reliably determine which speculative navigation, if any, was used.

Combining **Speculation navigation used** with **Speculation navigation tags** can help identify rules that trigger frequently but rarely contribute to the navigation that visitors actually take.

## Speculation metrics

In addition to dimensions, RUMvision collects several numeric metrics that describe the amount of speculative work performed by the browser.

### Speculative navigations

The number of speculative navigations that were actually started by the browser during the pageview.

This should not necessarily be interpreted as the total number of candidates defined by your Speculation Rules. It represents the speculative navigations exposed by the Speculative Load Measurement API for that pageview.

The API currently does not expose the total candidate pool separately. This means that RUMvision can observe how many speculative navigations the browser actually started, but cannot distinguish between, for example, a rule with 5 available candidates where all 5 were started and a rule with 100 available candidates where the browser selected only 5.

Candidate count would provide useful additional context for detecting unexpectedly broad rules and comparing how aggressively the browser acts on the available candidate pool. Until such a signal is available, treat **Speculative navigations** as a measurement of work actually started by the browser, not of rule breadth itself.

A higher value is not automatically problematic. However, consistently high values combined with little successful usage can indicate that your Speculation Rules are too broad or aggressive.

A successful speculative navigation does not necessarily mean that the overall strategy was efficient. If one speculative navigation matched the eventual destination after the browser started two speculative navigations, that represents a very different amount of speculative work from one matching navigation after 50 or 200 were started.

For this reason, combine **Speculative navigations** with **Navigation Used** rather than treating successful usage as a binary success signal. The useful question is not only whether one speculation matched the eventual destination, but also how much speculative work was required to produce that match.

Percentiles can be particularly useful here. A template may have a low median speculative navigation count while still showing a much larger p90 or p95. This usually points to a subset of pages, rules or page states that deserve separate investigation rather than a problem affecting the entire template.

### Speculative preconnects

The number of speculative preconnects initiated by the browser.

This metric shows how much preconnect activity occurred, but does not indicate whether an individual preconnect was eventually beneficial.

When this number is unexpectedly high, inspect which origins are being preconnected to and whether those origins are commonly needed shortly afterwards.

### Speculative preloads

The number of speculative preloads initiated by the browser.

This metric becomes especially useful when combined with **Unused preloads**. A high number of preloads is not necessarily wasteful if the resources are subsequently consumed.

### Unused preloads

The number of speculative preloads that were not used.

This value is also reported as `0` when speculative preloads were present but all of them were used. This makes it possible to calculate an unused preload ratio:

```
unused preloads / speculative preloads
```

A consistently high ratio can indicate unnecessary speculative resource loading and therefore avoidable bandwidth usage.

## Using Speculation Rules RUM data

The dimensions and metrics are most useful when combined rather than interpreted independently.

### Evaluating navigation efficiency

Start with **Speculative navigations** to understand how many speculative navigations are being triggered.

You can then use **Speculation navigation tags** to determine which rules or strategies are responsible, and **Speculation navigation used** to see which of those strategies actually resulted in the visitor's navigation.

For example, when a pageview contains:

```
Speculative navigations: 10
  
  Speculation navigation tags:
  - prerender_until_script:eager
  - prerender_until_script:eager:count=10
  
  Speculation navigation used:
  - prerender_until_script:eager
```

One of the ten triggered speculative navigations matched the actual destination. The other nine did not match the navigation the visitor eventually took.

If this pattern occurs frequently, consider reviewing the associated Speculation Rule. Depending on the use case, possible experiments include narrowing the rule scope, reducing the eagerness level, or testing another speculation type such as `prefetch`, `prerender_until_script` or `prerender`.

### Finding inefficient speculation by template

Looking at **Speculative navigations** on its own tells you how many speculative navigations the browser started, but not whether that amount is appropriate for the page.

A useful next step is to combine this metric with a **Template** dimension. Different templates often expose very different numbers of possible next navigations. A product listing or search result page, for example, may contain many links and therefore trigger substantially more speculative navigations than a product detail page.

Once you have identified templates with a relatively high number of speculative navigations, use **Navigation Tags** to determine which rules and strategies are responsible. This dimension can contain both developer-defined tags and combined `:` values such as:

```
prerender_until_script:eager
```

You can then use **Navigation Used** to determine which speculative navigation matched the destination the visitor actually chose.

For example, imagine that product listing pages commonly show:

```
Template: Product listing
  Speculative navigations: 6
  Navigation Tags: prerender_until_script:eager
  Navigation Used: none
```

This means that the browser started multiple speculative navigations on those pageviews, but none of them matched the navigation eventually taken by the visitor.

If this pattern occurs frequently for the same template, rule tag or strategy, the Speculation Rules may be broader or more aggressive than needed. Consider inspecting which links are eligible for speculation and whether the rule scope or eagerness level can be adjusted.

For comparison, another template may show fewer speculative navigations while more often exposing a real value in **Navigation Used**:

```
Template: Product detail Speculative navigations: 2 Navigation Tags: prerender_until_script:eager Navigation Used: prerender_until_script:eager
```

This does not automatically mean that two speculative navigations is the ideal amount, but it provides much stronger evidence that the speculation being initiated on this template corresponds with actual visitor behaviour.

It is also useful to compare multiple percentiles within the same template. A relatively low p50 or p75 combined with a much higher p90 or p95 can indicate a long-tail problem.

For example, most product pages may only start a small number of speculative navigations, while a smaller subset starts dozens or even hundreds. In that situation, changing the Speculation Rules for every product page may be the wrong response. Instead, investigate what distinguishes the affected pageviews.

Possible causes include different page layouts, unusually large link sets, recommendation components, dynamically inserted links or a specific tagged rule that only applies in certain situations.

This distinction helps separate **structural inefficiency**, where a template consistently triggers too much speculative work, from **outliers**, where only a specific subset of pages or page states requires attention.

Useful combinations to investigate include:

- **Template + Speculative navigations**  
   Find templates where browsers start relatively many speculative navigations.
- **Template + Navigation Tags**  
   Identify which developer tags, speculation types and eagerness levels are responsible.
- **Template + Navigation Used**  
   See whether speculative navigations on that template are actually matching visitor navigation.
- **Navigation Tags + Navigation Used**  
   Compare rules that trigger frequently with the rules and strategies that ultimately result in a used navigation.

After changing a Speculation Rule, collect new RUM data and compare the same template and dimensions again. This makes it possible to determine whether reducing the rule scope, changing eagerness or using another speculation type actually improved real-world efficiency.

### Evaluating preload efficiency

Use **Speculative preloads** together with **Unused preloads** to determine whether speculative loading is causing resources to be downloaded without being consumed.

For example:

```
Speculative preloads: 5 Unused preloads: 0
```

means that all measured speculative preloads were eventually used.

When the unused ratio is consistently high, inspect the affected pages and Speculation Rules before changing the implementation. A rule that is too broad or too eager can cause work to be performed for destinations that visitors rarely choose.

Start by breaking this ratio down by **Template**. Different parts of a website can have very different preload behaviour, and an overall site-wide ratio can hide a specific template where speculative preloads frequently remain unused.

For example, if collection pages commonly report many speculative preloads but almost no unused preloads, while product pages report a similar preload count together with several unused preloads, the product template is the more useful place to investigate.

This makes **Template + Speculative preloads + Unused preloads** a practical combination for finding where preload behaviour deserves closer inspection.

As with navigations, also look beyond a single percentile. A high p75 or p90 for unused preloads can reveal a subset of pageviews where preload behaviour differs substantially from the typical page.

### Comparing different strategies

The combined `[type:eagerness]` values make it possible to compare strategies such as:

- `prefetch:moderate`
- `prerender:eager`
- `prerender_until_script:eager`

Do not assume that a more aggressive eagerness level automatically results in more speculative work. The number of triggered navigations also depends on how narrowly the corresponding rule selects candidates.

For example, an `immediate` rule can be applied to a small, highly targeted set of links while a `moderate` rule applies to a much broader set. In real-user data, the `immediate` strategy could therefore result in fewer triggered speculative navigations despite being the more aggressive eagerness mode.

Compare the observed navigation count, rule tags and actual usage together rather than ranking strategies by eagerness alone.

Developer-defined tags can provide an additional layer of context. For example, you could tag rules based on where they are used, such as product cards, search results or primary navigation.

This allows you to identify which rules generate substantial speculative activity and which ones are most often associated with a successful navigation.

### Validating changes with new RUM data

Speculation data should be treated as observational field data. It can identify inefficient patterns and affected parts of your site, but changes to your Speculation Rules still need to be made within your website or application.

After adjusting a rule, such as changing its eagerness, scope or speculation type, collect new RUM data and compare the resulting navigation usage and preload efficiency.

This iterative approach makes it possible to optimize Speculation Rules based on real visitor behaviour rather than relying only on local testing.

Last changed 27 October 2026
