Widely available Supported across all major browsers. Safe to use in production.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
66
16
57
12.1
66
12.2

The abort() method of the AbortController interface aborts an asynchronous operation before it has completed. This is able to abort fetch requests, the consumption of any response bodies, or streams.

66
16
57
12.1
66
12.2
abort (reason parameter)

`reason` parameter

98
98
97
15.4
98
15.4

The AbortController() constructor creates a new AbortController object instance.

66
16
57
12.1
66
12.2

The signal read-only property of the AbortController interface returns an AbortSignal object instance, which can be used to communicate with/abort an asynchronous operation as desired.

66
16
57
12.1
66
12.2

The AbortSignal interface represents a signal object that allows you to communicate with an asynchronous operation (such as a fetch request) and abort it if required via an AbortController object.

66
16
57
11.1
66
11.3

The abort event of the AbortSignal is fired when the associated request is aborted, i.e., using AbortController.abort().

66
16
57
11.1
66
11.3

The AbortSignal.abort() static method returns an AbortSignal that is already set as aborted (and which does not trigger an AbortSignal/abort_event event).

93
93
88
15
93
15
abort_static (reason parameter)

`reason` parameter

98
98
97
15.4
98
15.4

The aborted read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (true) or not (false).

66
16
57
11.1
66
11.3

The reason read-only property returns a JavaScript value that indicates the abort reason.

98
98
97
15.4
98
15.4

The throwIfAborted() method throws the signal's abort AbortSignal.reason if the signal has been aborted; otherwise it does nothing.

100
100
97
15.4
100
15.4
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (12.1)
Implementation note
  • Even though `window.AbortController` is defined, it doesn't really abort `fetch` requests. See bug 174980.
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (12.2)
Implementation note
  • Even though `window.AbortController` is defined, it doesn't really abort `fetch` requests. See bug 174980.
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (12.1)
Implementation note
  • Even though `window.AbortController` is defined, it doesn't really abort `fetch` requests. See bug 174980.
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (12.2)
Implementation note
  • Even though `window.AbortController` is defined, it doesn't really abort `fetch` requests. See bug 174980.
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (12.1)
Implementation note
  • Even though `window.AbortController` is defined, it doesn't really abort `fetch` requests. See bug 174980.
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (12.2)
Implementation note
  • Even though `window.AbortController` is defined, it doesn't really abort `fetch` requests. See bug 174980.
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (12.1)
Implementation note
  • Even though `window.AbortController` is defined, it doesn't really abort `fetch` requests. See bug 174980.
Notes 3 item(s)
Limitation
  • This browser only partially implements this feature
Removed
  • This feature was removed in a later browser version (12.2)
Implementation note
  • Even though `window.AbortController` is defined, it doesn't really abort `fetch` requests. See bug 174980.

Use cases

  • Using AbortController and AbortSignal

    The AbortController interface represents a controller object that allows you to abort one or more Web requests as and when desired.

Cautions

  • May not be supported in older browsers.

Implementation notes

  • Some APIs require a secure context (HTTPS) or user activation. Check the requirements before use.