Intent to Extend Experiment: fetchLater API

301 views
Skip to first unread message

Chromestatus

unread,
Sep 3, 2024, 10:12:32 PMSep 3
to blin...@chromium.org, yoav...@chromium.org, deno...@chromium.org, my...@chromium.org, pending-beac...@chromium.org

Contact emails

my...@chromium.org, deno...@chromium.org, pending-beac...@google.com

Explainer

https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md

Specification

https://whatpr.org/fetch/1647/9ca4bda...37a66c9.html

Design docs


https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md
https://docs.google.com/document/d/1U8XSnICPY3j-fjzG35UVm6zjwL6LvX6ETU3T8WrzLyQ/edit#heading=h.ms1oipx914vf

Summary

fetchLater() is a JavaScript API to request a deferred fetch. Once called, the request is queued by the browser, and will be invoked in one of the following scenarios: • The document is destroyed. • After a certain time. The API returns a FetchLaterResult that contains a boolean field "activated" that may be updated to tell whether the deferred request has been sent out or not. On successful sending, the whole response will be ignored by browser, including body and headers. Nothing at all should be processed or updated, as the page may have already be gone. Note that from the point of view of the API user, the exact send time is unknown.



Blink component

Blink>Network>FetchAPI

Search tags

beacon, pending beacon, page unload beacon, unload beacon, fetchlater

TAG review

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

TAG review status

Issues addressed

Chromium Trial Name

FetchLaterAPI

Origin Trial documentation link

https://chromium.googlesource.com/chromium/src/+/main/docs/experiments/fetch-later.md

WebFeature UseCounter name

kFetchLater

Risks



Interoperability and Compatibility

None



Gecko: Positive (https://github.com/mozilla/standards-positions/issues/703)

WebKit: Support (https://github.com/WebKit/standards-positions/issues/85)

Web developers: Positive (https://discourse.wicg.io/t/proposal-stateful-javascript-page-unload-beacon-api/5776)

Other signals: W3C WebPerf: https://w3c.github.io/web-performance/meetings/2022/2022-03-31/index.html

Security

https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md#security-considerations https://docs.google.com/document/d/1U8XSnICPY3j-fjzG35UVm6zjwL6LvX6ETU3T8WrzLyQ/edit?pli=1#heading=h.kztg1uvdyoki



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



Goals for experimentation



Reason this experiment is being extended

The OT originally spans from 121-126, we would like to extend it starting from 130-132, as there are implementation changes in between that we want to disable. The final API detail [1] is currently being discussed with WebKit Fetch folks. It is unlikely that we will ship the current OT version of the API behavior as we need to update implementation to accommodate for the decision. At the same time, we have received additional feedback after the previous OT extension. There are also new users currently trying to evaluate the API with their usage and need more time to collect the metrics, but our OT token will expire in early September. We would like to request an extension to help both of us. [1]: https://github.com/WICG/pending-beacon/issues/87#issuecomment-2315624105



Ongoing technical constraints

See https://chromium.googlesource.com/chromium/src/+/main/docs/experiments/fetch-later.md#what_s-not-supported for what's supported and what's not supported in the OT implementation.



Debuggability

There are no particular debugging APIs made available or Chrome DevTools integrations yet.



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

Yes

This is a JS API that will be available to Blink platforms.



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

Yes

https://wpt.fyi/results/fetch/fetch-later



DevTrial instructions

https://chromium.googlesource.com/chromium/src/+/main/docs/experiments/fetch-later.md

Flag name on chrome://flags

FetchLaterAPI

Finch feature name

FetchLaterAPI

Requires code in //chrome?

True

Tracking bug

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

Launch bug

https://launch.corp.google.com/launch/4272588

Estimated milestones

Origin trial desktop first 121
Origin trial desktop last 126
Origin trial extension 1 end milestone 132
DevTrial on desktop 120
Origin trial Android first 121
Origin trial Android last 126
DevTrial on Android 120


Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/4654499737632768?gate=6086614150021120

Links to previous Intent discussions

Intent to Prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/KXnqpUpVwPQ
Intent to Experiment: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAH3JASUZRWPgtO7b%3DQ%2BXOEEg7LMXnuoq3PFVv_EpARwbntf-ZQ%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

Domenic Denicola

unread,
Sep 4, 2024, 2:34:31 AMSep 4
to blink-dev, Chromestatus, Yoav Weiss, Daisuke Enomoto, Ming-Ying Chung, pending-beac...@chromium.org
LGTM. It seems like there has been clear progress on all of the required fronts, and what's more, there's been a break between the previous origin trial and this one, so there's no concern about an extended OT being used as a soft-launch.

On Wednesday, September 4, 2024 at 11:12:32 AM UTC+9 Chromestatus wrote:

Contact emails

my...@chromium.org, deno...@chromium.org, pending-beacon-experiment@google.com
Reply all
Reply to author
Forward
0 new messages