This document describes the status of the current implementation of the FetchLater API in Chrome, and how to enable it manually.
Starting from version 121, Chrome experimentally supports the FetchLater API, which allows website authors to specify one or more beacons (HTTPS requests) that should be sent reliably when the page is being unloaded.
See the public explainer to learn more about how it works.
Note that this API is not enabled by default. Instead, Chrome plans to run Origin Trials to evaluate its impact. But Chrome also provides some ways to fully opt-in to the API for web developers who what to try the features.
Chrome supports all the JavaScript APIs described in the spec PR, specifically:
fetchLater()
method, a fetch()
-like API.Deferred fetching
behavior.The following features are not finalized in the spec PR, and hence not supported in Chrome:
The following features work differently than the one described in explainer and spec:
The API can be enabled by a command line flag.
Passing --enable-features=FetchLaterAPI --enable-blink-features=FetchLaterAPI
command line flag to Chrome enables FetchLater API support.
Added the following line to an HTTPS web page, and load the page into a Chrome tab.
<script> fetchLater('/test'); </script>
Close the tab, and you should be able to observe a request sent to /test
on your web server that hosts the page.