Preload Scanner and fetchpriority Attribute
The Preload Scanner scans raw HTML bytes in parallel with the main parser to start network fetches early. fetchpriority="high" elevates an LCP image above non-blocking scripts in the transfer queue.
LCP Prioritization: Default vs fetchpriority='high'
<img src="/hero.webp" alt="Product" />
<!-- Queued at Low priority until Layout -->Delayed behind defer/async scripts.
<img src="/hero.webp" alt="Product"
fetchpriority="high" decoding="sync" />Scheduled as soon as the Preload Scanner parses it.
Under the Hood
Treat the Preload Scanner as an airport baggage advance scout: while the main HTML parser is stuck at security behind a blocking <script>, the scanner sprints ahead through the raw byte stream and puts critical luggage on the conveyor belt early.
- As soon as the first HTML packets arrive, a dedicated thread (Preload Scanner) extracts
<link>,<script>, and<img>tags before DOM construction completes for the Browser Rendering Pipeline. - By default, Blink queues images at
Lowpriority and only promotes in-viewport images toHighafter the first Layout pass. fetchpriority="high"assignsHighpriority in the HTTP/2 or HTTP/3 queue immediately upon HTML discovery, whilefetchpriority="low"demotes carousel slides out of the way.
<!-- Discovered in the first TCP window; queued ahead of deferred scripts -->
<img
src="/hero-banner.avif"
width="1200"
height="640"
fetchpriority="high"
decoding="async"
alt="Dashboard overview"
/>Problem Genealogy
- 2008 (Preload Scanner): Workaround for synchronous
<script>tags stalling downstream resource discovery. - 2016 (
<link rel="preload">): Early discovery for resources hidden inside CSS/JS, frequently abused by pasting 12 preload tags in<head>and saturating the connection. - 2023+ (
fetchpriorityBaseline): Fine-grained relative priority control without duplicating preload tags.
Production Pitfalls
- Client-injected LCP images: The Preload Scanner cannot see images mounted dynamically by React/SPA bundles until an Event Loop task executes JS, by which time your LCP budget is already half-spent.
- Overusing
fetchpriority="high": Marking 10 images ashighcancels prioritization benefits and delays critical stylesheets.
- When not to use
fetchpriority="high": Never apply it to below-the-fold images or secondary web fonts; for cross-page navigation speedups, use Speculation Rules instead.
Connections & Logical Next Steps
- What This UnlocksContent Security Policy Nonces and strict-dynamic
- What This UnlocksDOM & CSSOM Construction
- What This Unlocks103 Early Hints
- What This UnlocksFont Loading & CLS Mechanics
- What This UnlocksHTTP/2 & HTTP/3 Multiplexing
- What This UnlocksImport Maps & Browser-Native Module Resolution
- What This UnlocksResponsive Images & Decoding
- What This UnlocksStreaming SSR & Progressive Flushing
- Under the HoodBrowser Rendering Pipeline (Critical Rendering Path)
The browser HTML parser and preload scanner evaluate script nonces before executing fetched scripts.
Preload scanner discovers blocked CSS and JS assets before the main parser stalls.
103 Early Hints feed the same speculative preload queue before the HTML parser even starts.
Preloading critical WOFF2 subsets starts font downloads before CSSOM parsing finishes.
The preload scanner queues concurrent asset fetches that rely on multiplexed streams.
Nested import-map subgraphs still require modulepreload links so the preload scanner fetches deep dependencies early.
The HTML preload scanner evaluates srcset, sizes, and fetchpriority before CSS layout runs.
Flushing <head> early lets the preload scanner fetch CSS and JS while the server awaits DB queries.
Governs availability of critical resources (CSS, fonts, LCP hero image) prior to first Paint.
Preload scanner prioritizes current-page subresources, while Speculation Rules prerender next-page navigations.
Nested ES module imports cannot be discovered by the HTML preload scanner without modulepreload hints.
Mechanical Comparisons
Nested ES module imports cannot be discovered by the HTML preload scanner without modulepreload hints.
Preload scanner prioritizes current-page subresources, while Speculation Rules prerender next-page navigations.