MDN Web Docs

Value

A boolean value indicating the keepalive status of the request.

Examples

Create a Request with keepalive

In the following snippet, we create a new request using the Request() constructor with keepalive set to true, then save the keepalive value of the request in a variable:

js

const options = {
  keepalive: true,
};
const myRequest = new Request("flowers.jpg", options);
let myKeepAlive = myRequest.keepalive; // true

Specifications

Specification
Fetch
# ref-for-dom-request-keepalive②

Browser compatibility

See also

Help improve MDN

Yes No

Learn how to contribute

This page was last modified on by MDN contributors.

Read the original on developer.mozilla.org ↗