[whatwg/fetch] Deferred fetching (PR #1647)

Add a JS-exposed function to request a deferred fetch.

A deferred fetch would be invoked in one of two scenarios:
- The document is destroyed (the fetch group is terminated)
- The document is backgrounded (the fetch group is deactivated) and not restored after a certain time.

A few constraints:
- Deferred fetch body sizes are limited to 64KB per origin. Exceeding this would immediately reject with a QuotaExceeded.
- Request body streams are not allowed. A request body, if exists, has to be a byte sequence.

The JS function is called `requestDeferredFetch` but that's bikesheddable.

See https://github.com/WICG/pending-beacon/issues/70

<!--
Thank you for contributing to the Fetch Standard! Please describe the change you are making and complete the checklist below if your change is not editorial.
-->

- [ ] At least two implementers are interested (and none opposed):
   * …
   * …
- [ ] [Tests](https://github.com/web-platform-tests/wpt) are written and can be reviewed and commented upon at:
   * …
- [ ] [Implementation bugs](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) are filed:
   * Chromium: …
   * Gecko: …
   * WebKit: …
   * Deno (not for CORS changes): …
- [ ] [MDN issue](https://github.com/whatwg/meta/blob/main/MAINTAINERS.md#handling-pull-requests) is filed: …

(See [WHATWG Working Mode: Changes](https://whatwg.org/working-mode#changes) for more details.)

You can view, comment on, or merge this pull request online at:

  https://github.com/whatwg/fetch/pull/1647

-- Commit Summary --

  * Deferred fetching

-- File Changes --

    M fetch.bs (215)

-- Patch Links --

https://github.com/whatwg/fetch/pull/1647.patch
https://github.com/whatwg/fetch/pull/1647.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/pull/1647
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/pull/1647@github.com>

Received on Tuesday, 2 May 2023 12:28:12 UTC