← Back to release summary

Fetch API: AbortSignal and AbortController

Category
Network / Connectivity
Type
New or changed feature
Status
Enabled by default (Chrome 66)
Intent stage
None

Summary

A fetch() can be made cancellable by passing an AbortSignal "signal" in the fetch options. Calling abort() on the associated AbortController will then cancel the fetch.

Standards & signals

Docs: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal https://developer.mozilla.org/en-US/docs/Web/API/AbortController

Samples: https://developers.google.com/web/updates/2017/09/abortable-fetch

View on chromestatus.com