Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use source document for prefetch lookup #358

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

domenic
Copy link
Collaborator

@domenic domenic commented Feb 3, 2025

In particular, any time we look up a prefetch record to use for a navigation request, we now look it up in (a snapshot of) the source document's list of prefetch records, instead of looking it up in the target navigable's active document's list of prefetch records.

This impacts cases like allowing prefetches to fulfill navigations to target="_blank" links, and also all prerender cases (where the target navigable is a new prerender navigable).

Fixes #261. Closes #267 by superseding it, although it is mostly a port of that PR updated on top of the current spec.


@hiroshige-g FYI. Sorry for dropping #267.

In particular, any time we look up a prefetch record to use for a navigation request, we now look it up in (a snapshot of) the source document's list of prefetch records, instead of looking it up in the target navigable's active document's list of prefetch records.

This impacts cases like allowing prefetches to fulfill navigations to target="_blank" links, and also all prerender cases (where the target navigable is a new prerender navigable).

Fixes #261. Closes #267 by superseding it, although it is mostly a port of that PR updated on top of the current spec.

Co-authored-by: Hiroshige Hayashizaki <[email protected]>
Copy link

github-actions bot commented Feb 3, 2025

Preview:

@domenic domenic merged commit 24b2405 into main Feb 3, 2025
2 checks passed
@domenic domenic deleted the prerender-source-document-take-2 branch February 3, 2025 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Speculation rules prefetch results are not used for prerendering
1 participant