dom...@chromium.org, jbr...@chromium.org, liviu...@chromium.org
https://github.com/WICG/nav-speculation/blob/main/triggers.md#no-vary-search-hint
https://wicg.github.io/nav-speculation/prerendering.html
Adds a hint to speculation rules that informs the navigation prerender cache that the URL to be prerendered expects to receive the same No-Vary-Search header in the response.
The hint is useful because prerenders that depend on No-Vary-Search to match to navigations do not benefit the user if the navigation happens before prerender headers return from the server. Using the hint, the web browser will expect, but verify, that the No-Vary-Search hint matches with the No-Vary-Search header. If the No-Vary-Search hint does not match the No-Vary-Search header received then the web browser will send a new request.
Not applicable. The TAG has already given a negative opinion on the overall complexity of speculation rules ( https://github.com/w3ctag/design-reviews/issues/721 ), so we anticipate it would not be a good use of their time to review additions to the syntax. The addition itself is small and any architectural questions about it would be covered under the general closed speculation rules review.
Not applicable
None
Gecko: No signal (https://github.com/mozilla/standards-positions/issues/620#issuecomment-1608195274)
WebKit: No signal (https://github.com/WebKit/standards-positions/issues/54#issuecomment-1608197504)
Web developers: Below is the text from the I2S of the No-Vary-Search on navigational prefetch, and we believe the same applies to Prerendering. Google Search has been experimenting with No-Vary-Search header / Speculation Rules "expects_no_vary_search". This functionality helps Google Search to match prefetched content to the next user navigation. Developers can use parameters in the prefetched URL that are not needed when navigating to the actual link (e.g. the source of the link click). The server can customize behavior using these parameters without causing a cache miss in the browser. "expects_no_vary_search" addition to Speculation Rules allows the browser to completely handle the case where the user navigates to a URL that is currently prefetched by waiting for the ongoing prefetch instead of directly requesting the page from the server. Google Search conducted experiments prefetching Search results pages from the search box and other links that lead to another Search results page. There was significant latency improvement for navigating to Search result pages prefetched using No-Vary-Search header and "expects_no_vary_search".
Other signals: No-Vary-Search header has been discussed, together with No-Vary-Search Hint for Prefetch Speculation Rules at Web Perf WG meeting at TPAC 2023. https://docs.google.com/presentation/u/1/d/1GK92nCORW5vKd7LgGtTsgy35eqTV7P71l05pHsni8ok/edit#slide=id.g240fd6541f7_0_31
(Text taken from Prefetch NVS I2S)
No-Vary-Search will be used in tandem with Speculation Rules (https://wicg.github.io/nav-speculation/speculation-rules.html). The default usage of No-Vary-Search will not make it hard for Chrome to maintain good performance.
See: https://github.com/WICG/nav-speculation/blob/main/no-vary-search-security-privacy-questionnaire.md
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
We are closely working with Android WebView team, and the broader prerender feature is gated through new AwSettings API (currently @RequiresOptIn) so there's zero risk that it will break existing WebView apps.
None
Yes
Yes
https://wpt.fyi/results/speculation-rules/prerender?label=experimental&label=master&aligned
(The test files starting with no-vary-search)
None
Prerender2NoVarySearch
False
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
https://chromestatus.com/feature/5190922953555968?gate=5148879099265024
Intent to prototype: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CA%2B7y87rgssbBecLSY5fz03ATcAAjgy%3DjY322w_2roQdsehP4Dg%40mail.gmail.com
This intent message was generated by Chrome Platform Status.
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/CAHaAqYJphk8wg8yLr-VFe2QJDZ4N%3D8Z%2BBAs9VL5scY-brTmRTg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/457ce01c-56ea-42a9-b9ef-1d84216ccd90%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw9p78D28sGy7zBHQk1cij7PwDs7EE8GnDZ62hpudydOtg%40mail.gmail.com.
LGTM2
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHaAqYJphk8wg8yLr-VFe2QJDZ4N%3D8Z%2BBAs9VL5scY-brTmRTg%40mail.gmail.com.
--
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.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/457ce01c-56ea-42a9-b9ef-1d84216ccd90%40chromium.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.
> Do you have a sense of how often the failure cases happen? Also what is the cost of this failure?The discussion is limited to in-progress prefetches that have not yet received headers when the navigation to a non-exact match URL happens.
- With our partner, both hint and header are the same in a same site navigation use case. It would be possible to have hint and header be different and prefetch and navigation URLs still match by No-Vary-Search header variance but the easiest way is to use the same hint and header. So in this sense, waiting for headers is always successful in our experiment. If the navigation URL doesn't match the prefetch URL by No-Vary-Search header variance the cost is the time we blocked navigation waiting for headers, so the portion of time to first byte of the prefetch between navigation time and the prefetch receiving headers. This cost decreases with how close to the prefetch receiving headers the navigation happens.
- Not having the hint, the cost is the fact that we could have used the in-progress prefetch serving No-Vary-Search header but we didn't. This cost is the portion of time to first byte from the beginning of the prefetch request to navigation time. This cost increases with how close to the prefetch receiving headers the navigation happens.
LGTM2
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/CAHaAqYJphk8wg8yLr-VFe2QJDZ4N%3D8Z%2BBAs9VL5scY-brTmRTg%40mail.gmail.com.
--
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/457ce01c-56ea-42a9-b9ef-1d84216ccd90%40chromium.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.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw9p78D28sGy7zBHQk1cij7PwDs7EE8GnDZ62hpudydOtg%40mail.gmail.com.
--
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/7bad86d7-3242-47f1-86fc-fdf1628bbc7bn%40chromium.org.
LGTM2
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAHaAqYJphk8wg8yLr-VFe2QJDZ4N%3D8Z%2BBAs9VL5scY-brTmRTg%40mail.gmail.com.
--
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.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/457ce01c-56ea-42a9-b9ef-1d84216ccd90%40chromium.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.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw9p78D28sGy7zBHQk1cij7PwDs7EE8GnDZ62hpudydOtg%40mail.gmail.com.
--
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.
> Another alternative is to race the requests right? What are the downsides of that?
This alternative has been mentioned in Intent to Prototype: No-Vary-Search Hint for Prefetch Speculation Rules. The downside is that sending duplicate requests will impose extra server load and compete for user's bandwidth.> From the API perspective, it feels like this is a knob that may not be well understood and I wonder if a browser can either do something automatically or at least have a default behavior that works in a vast majority of cases without the need for developer action. What are your thoughts on this?One alternative I've considered was to wait for prefetch/prerender headers for navigation URL that matches prefetch URL without query / fragment and then check for No-Vary-Search variance equivalence between the two URLs if a No-Vary-Search header was received. This approach has the downside that it would slow down navigation to pages that do not use No-Vary-Search header.
Example of such URL would be: a.com/product.html?id=123. a.com would want to prefetch/prerender the most popular products, but not all of them. Navigation to a less popular product page would be slowed down by waiting for headers for a prefetch/prerender of a popular product.
The current default behaviour should work for most cases: use the prefetch/prerender that has an exact match URL or has already received a No-Vary-Search header that matches, wait for headers to make a decision if there is a hint that matches, otherwise fallback to normal navigation. This allows optimal behaviour for the special use cases that I described above (hover / pointerdown trigger, in-progress prefetch/prerender independent of navigation) where the page author has to specify the hint while providing a reasonable default in the absence of the hint.
LGTM2
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/CAHaAqYJphk8wg8yLr-VFe2QJDZ4N%3D8Z%2BBAs9VL5scY-brTmRTg%40mail.gmail.com.
--
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/457ce01c-56ea-42a9-b9ef-1d84216ccd90%40chromium.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.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAOMQ%2Bw9p78D28sGy7zBHQk1cij7PwDs7EE8GnDZ62hpudydOtg%40mail.gmail.com.
--
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/7bad86d7-3242-47f1-86fc-fdf1628bbc7bn%40chromium.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.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/324fa743-ba7f-47cc-aef0-3842907e8a2cn%40chromium.org.