Intent to Ship: Speculation rules: referrer policy key

101 views
Skip to first unread message

Kevin McNee

unread,
Jan 10, 2023, 3:20:43 PM1/10/23
to blink-dev
Contact emails

mc...@chromium.org


Explainer

https://github.com/WICG/nav-speculation/blob/main/triggers.md#explicit-referrer-policy


Specification

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


Summary

This extends the speculation rules [1] syntax to allow developers to specify the referrer policy to use with speculative requests triggered by speculation rules.


This also reintroduces the "sufficiently-strict referrer policy" requirement [2].


[1] https://chromestatus.com/feature/5740655424831488

[2] https://github.com/WICG/nav-speculation/blob/main/fetch.md#stripping-referrer-information



Blink component

Internals>Preload


TAG review

https://github.com/w3ctag/design-reviews/issues/721


TAG review status

Pending


Risks

Interoperability and Compatibility

Gecko: No signal (https://github.com/mozilla/standards-positions/issues/620)


WebKit: No signal (https://github.com/WebKit/standards-positions/issues/54)


Web developers: Positive We have a partner that requires this capability to adopt cross-site prefetch, and another that requires this for same-origin prerendering.


Other signals:


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?

No. Enforcing the referrer policy requirement would not cause user-visible breakage, since preloading is a performance-enhancement feature that isn't guaranteed to trigger anyway.



Debuggability

In the DevTools Network tab, the speculative request can be selected to see referrer information.



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

Yes


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

Yes


Flag name

SpeculationRulesReferrerPolicyKey (Runtime Enabled Feature)


Requires code in //chrome?

False


Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1355146


Estimated milestones

We would like to ship this in M111.



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 anticipated.


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/4694585584910336


Links to previous Intent discussions

Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/qzElfWpzWXg/m/yC8gOtcBAwAJ



This intent message was generated by Chrome Platform Status.


Kevin McNee

unread,
Jan 10, 2023, 3:26:23 PM1/10/23
to blink-dev, Kevin McNee
Note: See this intent for context on reintroducing the sufficiently-strict referrer policy requirement.

Mike Taylor

unread,
Jan 11, 2023, 12:13:04 PM1/11/23
to Kevin McNee, blink-dev
This is important to have. 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/488e3cc7-a05b-4b16-9e9f-1ef78b8eac7fn%40chromium.org.


Rick Byers

unread,
Jan 11, 2023, 12:19:09 PM1/11/23
to Mike Taylor, Kevin McNee, blink-dev
Seems like a valuable and low-risk small addition to pre-fetching. LGTM2

I see the tests are failing on wpt.fyi due to prefetch not yet being enabled on desktop, right? Once prefetch ships on desktop will they start passing there, or is there more test infra work to do? Regardless it looks like they're passing in chromium infrastructure (modulo one bug) so I'm not too concerned. I'm just looking forward to having the full test suite results on wpt.fyi.

Thanks,
  Rick

Yoav Weiss

unread,
Jan 11, 2023, 12:20:39 PM1/11/23
to Rick Byers, Mike Taylor, Kevin McNee, blink-dev

Kevin McNee

unread,
Jan 11, 2023, 2:14:40 PM1/11/23
to blink-dev, Yoav Weiss, Mike Taylor, Kevin McNee, blink-dev, Rick Byers
Thank you.

For the tests, I had the following comment in the chrome status entry, which unfortunately I didn't notice wasn't included in the generated email:
Web Platform Tests Description
Tests may appear as failing on wpt.fyi as prefetch is not shipped/experimental on desktop (as of Dec 12 2022).

So for Rick's question, the only thing needed for coverage is the enabling of underlying features (namely prefetch) and any other speculation rule features with which these tests interact (e.g. document rules).
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

--
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+unsubscribe@chromium.org.

--
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+unsubscribe@chromium.org.

Rick Byers

unread,
Jan 11, 2023, 3:40:22 PM1/11/23
to Kevin McNee, blink-dev, Yoav Weiss, Mike Taylor
Got it, thanks Kevin!

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

--
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.

--
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.
Reply all
Reply to author
Forward
0 new messages