v150 · Performance
Unused Preload Auditor
The headline use case. Each row below is a real <link rel="preload" as="fetch"> injected into this page. Consume some and leave others idle, then read each preload's used value — a timestamp when the resource was consumed, or null when it hasn't been consumed yet. Treat null as definitive waste only when the page lifetime actually ends; a pagehide event with event.persisted === true may instead be entering the back/forward cache.
| Preloaded resource (as=fetch) | Consumed? | Action |
|---|
Report
Consume or leave preloads idle, then read the report.
// Each preloaded resource carries a `used` field:
const { preloads } = performance.getSpeculations();
for (const p of preloads) {
if (p.used === null) {
console.warn('Not consumed (yet):', p.url, '(as=' + p.as + ')');
} else {
console.log('Used preload:', p.url, 'at', p.used, 'ms');
}
}
// used === null means "not consumed at read time". Treat it as definitive
// waste only when the page lifetime ends; pagehide can also enter the BFCache.
see also
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗