How the Browser Preload Scanner Finds Resources Early
A team I helped last year had a hero image arriving 1.2 seconds into the load on a page whose HTML had finished downloading in 180 ms. The image was 94 KB on a fast connection. Nothing was slow.

A team I helped last year had a hero image arriving 1.2 seconds into the load on a page whose HTML had finished downloading in 180 ms. The image was 94 KB on a fast connection. Nothing was slow. The browser simply did not know the file existed until a stylesheet had downloaded, parsed, and told it, because the image had been set as a CSS background on a div.
That gap between a resource existing in your code and the browser knowing it needs fetching is where a lot of unexplained slowness lives. Browsers have a dedicated piece of machinery for closing it, the preload scanner, and it has been quietly saving badly built pages since 2008. Knowing what it can and cannot see tells you which half of your performance advice is pointless and which half is the only thing that matters.
A second parser that only looks for URLs
The main HTML parser builds the DOM in order, and it has to stop when it hits a synchronous script, because that script might write into the document. On a page with three blocking scripts in the head, the DOM construction pauses three times.
While that happens, the browser runs a second, much simpler pass over the raw bytes it has already received. This lookahead parser, the preload scanner, builds nothing. It scans for tokens that look like a resource, pulls the URL out, and hands it to the network layer so the fetch starts immediately. By the time the main parser gets unblocked and reaches the image at the bottom of your markup, that image is often already in the cache.
The attributes it reliably understands are the plain ones written into the HTML as text: src and srcset on an image, href on a stylesheet link, src on a script, href on a link with rel preload or preconnect, and the source elements inside a picture. It also honours the media attribute well enough to skip a source that cannot apply at the current viewport, which is why responsive images declared in markup get fetched correctly rather than twice.
Everything it cannot see
The scanner reads bytes. It does not run JavaScript, it has no CSSOM, and it knows nothing about your framework. So any resource whose address only exists after something executes is invisible to it.
| How the resource is declared | Found by the scanner | What it costs you |
|---|---|---|
| img with src or srcset in the HTML | Yes | Nothing, this is the fast path |
| CSS background image on an element | No | Waits for the stylesheet to download and parse |
| Web font in a font face rule | No | Waits for CSS, then for a matching element to need it |
| Image created by script, or a data src swapped in by a lazy loader | No | Waits for the script to download, parse and run |
| Dynamic import inside a module | No | Discovered one round trip late at best |
| Image inside HTML injected after load | No | Discovered after the response that carried it |
Two of those rows cause most real damage. A hero image set in CSS cannot start until the stylesheet is parsed, which stacks two serial round trips before a single pixel is requested. And a generic lazy loading script applied to every image, including the one at the top of the page, actively takes a resource the scanner had already found and hides it behind a script execution. I have seen that pattern cost 700 ms of Largest Contentful Paint on a page whose developers were busy optimising the image itself.
There is a third case worth naming because it is so old it has mostly been forgotten. A call to document.write in the head can invalidate everything the scanner has queued, since the document it was scanning is no longer the document being built. Chrome intervenes against it on slow connections, and ad tags are the last place it survives.
Why preloading everything is the wrong conclusion
The usual reaction to learning about this is to add link rel preload tags for the important files. That is backwards about half the time.
A preload tag for an image already written as an img in your HTML gains you almost nothing, because the scanner found it in the same pass that would have found the preload. What it does do is raise the priority of that fetch against everything else, which can push your stylesheet or your font down the queue and make the page render later while the image arrives sooner. Chrome will also warn in the console when a preloaded resource goes unused within a few seconds, which happens constantly on sites where preloads were added and the markup later changed.
The cases where preload earns its place are precisely the invisible rows in that table. A font declared in CSS and needed for the first paragraph. A background image behind a hero. A JSON payload fetched by the first component that renders. For everything else, the better fix is to stop hiding the URL from the scanner in the first place: move the hero image into an img tag with fetchpriority high, and keep loading lazy for things below the fold only.
The related trap is thinking async and defer scripts are free. They do not block the parser, but they still compete for bandwidth and for the connection slots described in the piece on how browsers limit connections. A page that preloads nine things on a 3G connection is a page where the first paint waits behind nine things.
Reading it in the Network panel
You can watch the scanner work without any special tooling. Open the Network panel, right click the column headers, and switch on Initiator and Priority.
Resources the scanner found show an initiator of the HTML document itself and start near the beginning of the waterfall, often before the stylesheet has finished. Resources discovered later show the stylesheet or a script as their initiator, and their bars start further right with a visible gap. Sort by start time and the shape tells you the story: a cluster of early fetches, then a pause, then a second cluster that the first cluster had to reveal. That second cluster is your late discovery cost.
Two more checks are quick. Throttle to Slow 4G, because on a fast local connection the whole effect compresses into noise. And run a Lighthouse pass, which flags the specific case of an LCP image that was lazily loaded or discovered late, with the saving in milliseconds attached. If you want the full set of columns and what the segments of each bar mean, that is covered in the walkthrough on reading the DevTools network waterfall.
What to change first
Find your Largest Contentful Paint element, then check how its URL is declared. If it is a CSS background or a script inserted image, that single change usually beats every other optimisation on the page, and it takes less time than arguing about image formats.
After that, strip loading lazy from anything in the first viewport, and leave the attribute everywhere else. Then look at your fonts, since a font face rule is invisible to the scanner by definition and a preload there is one of the few that consistently pays. The ordering rules for all of this sit alongside the notes on render blocking resources.
What I would not do is add preloads first and measure later. The scanner is already doing most of this job for you, and the useful work is finding the places where your own code has blindfolded it.
FAQ
Does the preload scanner run on every browser?
Yes, all current engines have one, and they have for years. The details differ, including which attributes are honoured and how aggressively fetches are started, so a waterfall from Chrome is a guide rather than a guarantee for Safari.
Does it work inside a streamed server response?
It works on whatever bytes have arrived, which is why flushing the head early still helps. Send the head with your stylesheet and hero image references in the first chunk and the scanner can start fetching while your server is still assembling the body.
Is fetchpriority a replacement for preload?
For resources the scanner already finds, usually yes, and it is the lighter tool. It reorders an existing fetch rather than creating a new declaration you have to keep in sync with your markup.
Why do some images get fetched twice?
Most often a preload whose attributes do not match the img that uses it, a different srcset or a missing media value, so the browser treats them as two resources. The console warning about an unused preload is the hint.
More in Browsers
Browsers
How CORS Preflight Requests Add an Extra Round Trip
A dashboard I was asked to look at last year loaded in 4.2 seconds against an API that answered every call in 30 ms.
Browsers
How Browsers Limit Connections and Queue Your Requests
Open the Network panel on a page that loads 40 images and you will see a shape that looks like a staircase.
Browsers
How Web Font Loading Works and How to Avoid Invisible Text
The page has loaded, the layout is there, but the headline and body text are blank for a second or two before they suddenly...