diff --git a/files/en-us/web/api/deferredrequestinit/index.md b/files/en-us/web/api/deferredrequestinit/index.md index da81e0bfbfd339d..f4e8075f41d1536 100644 --- a/files/en-us/web/api/deferredrequestinit/index.md +++ b/files/en-us/web/api/deferredrequestinit/index.md @@ -41,16 +41,11 @@ fetchLater("/send_beacon"); In this example we create a {{domxref("Request")}}, and provide an `activateAfter` value to delay sending the request for 60,000 milliseconds (or one minute): ```js -fetchLater( - { - url: "/send_beacon", - method: "POST", - body: getBeaconData(), - }, - { - activateAfter: 60000, // 1 minute - }, -); +fetchLater("/send_beacon", { + method: "POST", + body: getBeaconData(), + activateAfter: 60000, // 1 minute +}); ``` > [!NOTE] diff --git a/files/en-us/web/api/fetchlater_api/fetchlater_quotas/index.md b/files/en-us/web/api/fetchlater_api/fetchlater_quotas/index.md index 5738834b342de56..81cf4bc80e03088 100644 --- a/files/en-us/web/api/fetchlater_api/fetchlater_quotas/index.md +++ b/files/en-us/web/api/fetchlater_api/fetchlater_quotas/index.md @@ -150,13 +150,27 @@ Assuming a top-level document on `a.com`, which embeds a ` +``` + +This would not be considered "same-origin", despite being hosted on the same origin as the top-level document, as the ` +``` + +The `allow="deferred-fetch"` directive is needed to prevent same-origin iframes from using up the 512KiB quota, and the `allow="deferred-fetch-minimal"` directive is needed to prevent cross-origin iframes from using up the 128KiB quota. Including both directives will prevent both quotas from being used, regardless of the `src` value. ### Examples which throw a `QuotaExceededError` @@ -190,6 +204,14 @@ fetchLater("https://b.example.com", { method: "POST", body: a_40kb_body }); fetchLater("https://a.example.com", { method: "POST", body: a_40kb_body }); ``` +### Redirects of subframes back to the top-level origin allow use of the top-level quota + +Assuming a top-level document at `a.com`, which embeds `