Network & Performance

Preload Scanner and fetchpriority Attribute

Speculative HTML scanner discovering critical resources before JS execution, paired with fetchpriority to reorder the HTTP/2-HTTP/3 queue.

About this page
READ
2 min
BASELINE
Baseline · Newly available
Interactive Simulator

LCP Prioritization: Default vs fetchpriority='high'

Lines of Code
Before
1
After
2
Reflows / Browser Cost
Before
Post-Layout promotion
After
Immediate High priority
BeforeLCP image without explicit priority
<img src="/hero.webp" alt="Product" />
<!-- Queued at Low priority until Layout -->
Lines: 1Reflows: Post-Layout promotionDependencies: None

Delayed behind defer/async scripts.

After (Native)fetchpriority='high' on LCP image
<img src="/hero.webp" alt="Product"
     fetchpriority="high" decoding="sync" />
Lines: 2Reflows: Immediate High priorityDependencies: 0 JS

Scheduled as soon as the Preload Scanner parses it.

LCP Prioritization: Default vs fetchpriority='high'

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.

  1. 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.
  2. By default, Blink queues images at Low priority and only promotes in-viewport images to High after the first Layout pass.
  3. fetchpriority="high" assigns High priority in the HTTP/2 or HTTP/3 queue immediately upon HTML discovery, while fetchpriority="low" demotes carousel slides out of the way.
HTML
<!-- 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+ (fetchpriority Baseline): 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 as high cancels prioritization benefits and delays critical stylesheets.

Where this connects

Prerequisites

Next & related

Rendering Pipeline

DOM & CSSOM Construction

Preload scanner discovers blocked CSS and JS assets before the main parser stalls.

Network & Performance

103 Early Hints

103 Early Hints feed the same speculative preload queue before the HTML parser even starts.

Network & Performance

Responsive Images & Decoding

The HTML preload scanner evaluates srcset, sizes, and fetchpriority before CSS layout runs.

Network & Performance

Speculation Rules & Prerendering

Preload scanner prioritizes current-page subresources, while Speculation Rules prerender next-page navigations.

Mechanical Comparisons