Intent to Ship: Navigational prefetch: follow redirects

517 views
Skip to first unread message

Jeremy Roman

unread,
Dec 12, 2023, 2:02:39 PM12/12/23
to blink-dev

Note: I would like to roll this out via a standard Finch rollout in order to monitor for any issues, rather than enabling by default with the M122 release. This change is otherwise fairly minor in terms of the web platform API surface area.



Contact emails

jbr...@chromium.org

Explainer

None

Specification

https://wicg.github.io/nav-speculation/prefetch.html

Summary

Today, Chromium does not follow redirects when prefetching for navigation (most notably from speculation rules). With this change, it will follow redirects, even cross-origin and cross-site redirects. This is consistent with following redirects during other kinds of fetches, though additional privacy constraints apply to cross-site navigational prefetches.



Blink component

Internals>Preload

TAG review

None

TAG review status

Not applicable

Risks



Interoperability and Compatibility

The biggest interoperability risk is that differences in browsers' privacy models leads to different behavior in cross-site cases, leading to prefetches which complete successfully in some browsers but not in others. The specification is designed with this behavior converging as partitioning behavior in general converges, but some skew is expected in this area for now.



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

Security

No believed new issues, but see https://wicg.github.io/nav-speculation/speculation-rules.html#security-considerations



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

None



Debuggability

The feature should be debuggable through the Network panel of Chrome Dev Tools, and the upcoming Preloading panel.



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?

Yes

https://wpt.fyi/results/speculation-rules/prefetch/redirect-url.sub.https.html?label=master&label=experimental&aligned&q=speculation-rules%2Fprefetch%2Fredirect (not currently passing because this is disabled)



Flag name on chrome://flags

None

Finch feature name

PrefetchRedirects

Requires code in //chrome?

False

Availability expectation

Contingent on speculation rules prefetch generally; this is a minor change to it.

Adoption expectation

Existing users of speculation rules prefetch will automatically star following redirects rather than failing.

Estimated milestones

Shipping on desktop122
Shipping on Android122
Shipping on WebView122


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

None

Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5176234944495616

This intent message was generated by Chrome Platform Status.

Rick Byers

unread,
Dec 12, 2023, 5:34:51 PM12/12/23
to Jeremy Roman, blink-dev
Personally I'd consider this prefetch behavior change to be more of a UA impl detail than a "web exposed API". I'm really glad you're covering this in a spec and WPT in the hopes of moving prefetch towards more interoperability long-term (as opposed to the historically very UA-heuristic-centric model). But I don't think this specific detail makes sense to eg. request browser and TAG signals on independently from the rest of the prefetch spec, so thanks for not wasting people's time with that for this specific case. Definitely privacy review will be important, so thanks for creating the chromestatus entry and the extra transparency.

LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CACuR13fW3Vgk71H6-tH0ke5MN69KNWWgXnQtm91KUAFUqk89Mg%40mail.gmail.com.

Mike Taylor

unread,
Dec 12, 2023, 9:11:26 PM12/12/23
to Rick Byers, Jeremy Roman, blink-dev

Philip Jägenstedt

unread,
Dec 13, 2023, 9:31:23 AM12/13/23
to Mike Taylor, Rick Byers, Jeremy Roman, blink-dev
Reply all
Reply to author
Forward
0 new messages