concept Frontend & browsers
Preload scanner and browser resource priorities
Finding a URL early gives it a chance to start sooner. Follow two transfers through one busy slot to see when a priority hint changes their order and when an early fetch goes unused.
What it means
A preload scanner can find a resource URL in the HTML before the main parser reaches it. That gives the browser a chance to fetch the resource sooner, not a promise that the transfer will start immediately. Discovery answers “What could I fetch?” A fetch-priority hint expresses a preference among requests with the same destination, such as one image relative to other images. It does not reserve bandwidth or set a start time.
Try it
Simulation. Change only Target priority hint from auto to high. Compare when the target starts and when the competing transfer finishes. Reset returns to the original scenario.
Preload scanner and browser resource priorities
Explain discovered-resource timing and priority competition
Discovery and scheduling determine arrival; target is used in this scenario.
Scheduling result
- Stipulated useyes
- Ready for use (ms)170
- Unused transfer (ms)0
Ready-for-use is a modeled lower boundary, not an observed resource use or paint. Unused transfer time is not a quantified slowdown of other requests.
Evaluated inputs
- Required scenario evidence
- provided
- Scanner can identify URL
- yes
- Speculative discovery time
- 20 ms
- Normal discovery time
- 100 ms
- Current transfer occupies slot until
- 50 ms
- Toy scheduler respects hint
- yes
- Target priority hint
- auto
- Competing ready transfer duration
- 40 ms
- Target transfer duration
- 80 ms
- Target actually used
- yes
One nonpreemptive synthetic fetch slot and one competing transfer; fixed durations proxy bandwidth. Target high wins only when ready at slot release and policy respects hint; auto/low leave competing transfer first. This is not a browser scheduler, real multiplexing, cache, measured waterfall or guarantee.
About this model
The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.
Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.
With auto, the scanner finds the target at 20 ms, well before the main parser would find it at 100 ms. But the only transfer slot is busy until 50 ms. When it opens, the scheduler gives a ready competitor its 40 ms turn. The target starts at 90 ms, takes 80 ms, and is ready for use at 170 ms.
With high, the target is still discovered at 20 ms and still waits until at least 50 ms. This time the scheduler honors the hint: the target takes the slot from 50 to 130 ms, then the competitor runs from 130 to 170 ms. The target is ready 40 ms earlier, but the competitor finishes 80 ms later. Neither transfer got faster; they traded places.
When the hint makes no difference
The deciding moment in this simulation is when the slot opens. A target discovered by that moment can go first if its hint is high and the scheduler respects the hint. With auto or low, the ready competitor goes first. Once a transfer starts, the other one cannot interrupt it.
There are two different reasons a selected high hint might not help:
- The scheduler ignores the hint. Set
Toy scheduler respects hinttono. The target is known at 20 ms, but the scheduler does not consult its priority. The competitor goes first, and the target runs from 90 to 170 ms, just as it did withauto. - The URL is not known in time. Restore the scheduler setting to
yesand setScanner can identify URLtono. The speculative time of 20 ms no longer counts. At 50 ms the competitor takes the slot because the target is not yet known; priority does not enter the decision. The competitor finishes at 90 ms. The slot then sits empty for 10 ms before normal discovery at 100 ms lets the target start. It finishes at 180 ms.
A scanner that cannot identify the URL is a known condition, not missing evidence. If Required scenario evidence is missing, there is no timeline to interpret.
Use the unused-resource contrast without changing discovery or priority. The fetch finishes at the same time as before, but the ready-for-use value disappears and 80 ms of transfer work is counted as unused. That missing value is not a delayed use event. The model does not quantify how the extra work affects another request, and the browser has not been observed.
In practice
Separate arrival from use. For a target marked as used, the simulation reports it ready for use only once both the transfer has finished and the main parser has reached the normal discovery time. That is a readiness time, not a measurement of when anything appeared on screen. In the honored-high example, changing only Target actually used to no leaves the transfers in the same order. The target still finishes at 130 ms, but now its entire 80 ms in the slot was spent fetching something the page did not use.
On a real page, start with a resource the page needs and compare browser observations under the same resource demand. Ask when its URL was discoverable, when its transfer started and finished, and what else was waiting or in progress. A late start alone cannot distinguish late discovery from a wait after discovery. The simulation uses fixed transfer durations and one slot; it does not reproduce browser scheduling, multiplexing, or caching.
If the URL was known early but the transfer started late, look for competing work before trying to make discovery earlier still. Judge a hint by whether the needed resource became available sooner and what had to wait, not by the priority label alone.
Frequently asked questions
Editorial questions based on the listed sources and explicitly labeled local examples.
Can a scanner see runtime-generated URLs?
Not before the URL is available to the speculative discovery mechanism. The example stipulates when a resource becomes known; real speculative parsing and resource discovery depend on the browser and the page.
Is priority a guarantee?
No. The browser may interpret a relative fetch-priority hint under its own scheduling and resource constraints. A queued high-priority resource may still wait for work already in progress.
Can too many preloads compete?
In the one-slot scheduler here, an unnecessary ready preload can occupy the available slot and delay another transfer. Real browser scheduling and multiplexing differ; priority hints do not guarantee a particular start or completion order.
Is this a browser waterfall?
No. These timestamps come from a synthetic single-slot scheduler, not a network trace. Ready for use is a calculated milestone, not an observed use event. Unused transfer time is not a measured delay to other requests.
Sources & model boundaries
Primary references used for this explanation. The interactive example is an educational model, not a live check.
- WHATWG HTML: speculative parsing
speculative HTML parsing. Speculative parsing may fetch ahead of the normal parser; supported speculative fetching is implementation-dependent.
Checked .
- WHATWG HTML: fetch priority attributes
fetchpriority. High and low signal relative priority among requests of the same destination; not a guaranteed start or completion order.
Checked .