fetchLater() is a JavaScript API to request a deferred fetch. Once requested, the deferred request is queued by the browser, and will be invoked in one of the following scenarios:
The API returns a FetchLaterResult that contains a boolean field sent 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, including body and headers. Nothing at all should be processed or updated, as the page is already gone.
Note that from the point of view of the API user, the exact send time is unknown.
Web developers have a need for ‘beaconing’ - that is, sending a bundle of data to a backend server, without expecting a particular response, ideally at the ‘end’ of a user’s visit to a page. Existing beacon APIs are all based around a developer constructing and sending a beacon, and there's no good time for that "send" call to be made.
This API delegates the sending to the browser itself, so it can support requests on page unload or on page hide, without the developer having to implement send calls at exactly the right times.
No
No milestones specified
Thanks for working on this!! (and iterating on the solution based on feedback)
On Tue, Jul 18, 2023 at 4:23 AM Ming-Ying Chung <my...@chromium.org> wrote:
Hi Team,We plan to prototype the fetchLater API, which is the successor of the previous PendingBeacon API (intent to prototype mail, intent to OT mail). The fetchLater API is the result of discussion with users and other browser vendors.
I'm surprised not to see a discussion of the (poorly named, but heavily overlapping) Background Sync API that we've shipped for many years in the Explainer:Best,Alex
On Wednesday, July 19, 2023 at 1:26:42 AM UTC-7 Yoav Weiss wrote:
Thanks for working on this!! (and iterating on the solution based on feedback)
On Tue, Jul 18, 2023 at 4:23 AM Ming-Ying Chung <my...@chromium.org> wrote:
Hi Team,We plan to prototype the fetchLater API, which is the successor of the previous PendingBeacon API (intent to prototype mail, intent to OT mail). The fetchLater API is the result of discussion with users and other browser vendors.
--
You received this message because you are subscribed to the Google Groups "blink-network-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-network-...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-network-dev/ded76e5a-a388-4685-a36c-5cdb92093f15n%40chromium.org.