Request.priority

The priority read-only property of the Request interface contains the hinted priority of the request relative to other requests.

Value

A USVString indicating the hinted priority of the request. Possible values are:

  • high: Fetch the request at a high priority relative to other requests of a similar type.
  • low: Fetch the request at a low priority relative to other requests of a similar type.
  • auto: Default mode, which indicates no preference for the fetch priority. The browser decides what is best for the user.

Examples

In the following snippet, we create a new request using the Request() constructor (for an API endpoint) at a low priority, then save the priority of the request in a variable:

var myRequest = new Request('/background-api-call', {priority: 'low'});
var myPriority = myRequest.priority; // "low"

Specifications

No specification found

No specification data found for api.Request.priority.
Check for problems with this page or contribute a missing spec_url to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.

Browser compatibility

No compatibility data found for api.Request.priority.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.

See also