v151 · Performance · Router Source Values

Router Source Values Explorer

Reference for every possible value of workerMatchedRouterSource and workerFinalRouterSource. Choose a routing scenario below to see what each field reports and how the two values can diverge when a fallback is triggered.

Chrome 151 required. The field value reference and scenario simulator work in any browser. Actual live field values from PerformanceResourceTiming are only populated in Chrome 151+.

possible values

scenario simulator

Select a routing scenario to see what workerMatchedRouterSource and workerFinalRouterSource would report:

workerMatchedRouterSource
workerFinalRouterSource
Select a scenario above.

when matched ≠ final

The two fields can diverge when a primary source is unavailable and the router falls through to a fallback:

Scenario workerMatchedRouterSource workerFinalRouterSource
Cache rule matched, cache hit "cache" "cache"
Cache rule matched, cache miss → network fallback "cache" "network"
Network rule matched, served from network "network" "network"
Race rule matched, network won "race-network-and-fetch-handler" "network"
Race rule matched, fetch-handler won "race-network-and-fetch-handler" "fetch-event"
No SW or no rule matched "" (empty) "" (empty)

code

// Read the new fields from a PerformanceResourceTiming entry
const entries = performance.getEntriesByType('resource');
for (const entry of entries) {
  const matched = entry.workerMatchedRouterSource; // e.g. "cache"
  const final   = entry.workerFinalRouterSource;   // e.g. "network" (if cache missed)

  if (matched !== final) {
    // Primary source unavailable — browser fell through to fallback
    console.log(`Rule matched "${matched}" but served by "${final}"`);
  }
}

see also

implementation reference

Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗