Open hiroshige-g opened 1 year ago
In a scenario like:
The prefetched results from Step 1 isn't used for the prerendering navigation request in Step 2.
This is because prefetch records is Document-scoped (assciated with navigable’s active document in https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate):
navigable
Let prefetchRecord be the result of finding a matching prefetch record given navigable’s active document, entry’s URL, and targetSnapshotParams’s sandboxing flags.
but start user-agent initiated prerendering and start referrer-initiated prerendering uses a newly created navigable and thus no prefetch records are there.
Check sourceDocument of https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate instead of navigable’s active document in the case of prerendering. This would make start referrer-initiated prerendering to use the prefetched results in the scenario above.
sourceDocument
This has been fixed in Chrome so can this issue be closed now? Or is there spec updates to be done to make it clear this should be done?
Problem
In a scenario like:
The prefetched results from Step 1 isn't used for the prerendering navigation request in Step 2.
This is because prefetch records is Document-scoped (assciated with
navigable
’s active document in https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate):but start user-agent initiated prerendering and start referrer-initiated prerendering uses a newly created navigable and thus no prefetch records are there.
Possible Solution
Check
sourceDocument
of https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate instead ofnavigable
’s active document in the case of prerendering. This would make start referrer-initiated prerendering to use the prefetched results in the scenario above.