Navigation doesn't wait for an in-flight speculation-rules prefetch and fetches from the network instead
Categories
(Core :: DOM: Networking, defect, P3)
Tracking
()
People
(Reporter: smayya, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
When a navigation starts while a matching speculation-rules prefetch is still in flight, Gecko doesn't wait for it. The navigation goes to the network and the prefetch is thrown away.
The wait step, "wait for a matching prefetch record" (https://wicg.github.io/nav-speculation/prefetch.html#wait-for-a-matching-prefetch-record), is implemented but never called. WindowGlobalParent::WaitForMatchingPrefetchRecord, PrefetchMatchWaiter and PrefetchRecordParent::IsExpectedToMatch (which applies the rule's expects_no_vary_search hint to an in-flight record) exist, but DocumentLoadListener::TryActivateFromPrefetch only calls WindowGlobalParent::FindMatchingPrefetchRecord, which checks completed records only.
Every subtest of speculation-rules/prefetch/no-vary-search/prefetch-single-with-hint.https.html starts the navigation while the server is still holding the prefetch response. With the patches for bug 2070841 applied, all 19 subtests that expect the in-flight prefetch to be used fail (Navigation didn't use the prefetched response!), and all 9 that expect it not to be used pass.
| Reporter | ||
Updated•1 month ago
|
| Reporter | ||
Updated•1 month ago
|
| Reporter | ||
Updated•1 month ago
|
| Reporter | ||
Updated•1 month ago
|
Description
•