Request: destination property

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since June 2018.

* Some parts of this feature may have varying levels of support.

Note: This feature is available in Web Workers.

The destination read-only property of the Request interface returns a string describing the type of content being requested.

The string must be one of the audio, audioworklet, document, embed, fencedframe, font, frame, iframe, image, json, manifest, object, paintworklet, report, script, sharedworker, speculationrules, style, track, video, worker or xslt strings, or the empty string, which is the default value.

The destination is used by the user agent to, for example, help determine which set of rules to follow for CORS purposes, or how to navigate any complicated code paths that affect how specific types of request get handled.

These destinations vary substantially in how they operate. Some are data receptacles, where the received data is stored for processing later. Others are script-based, in which case the received data is delivered to a script by calling it and passing the data along. Script-based destinations include <script> elements, as well as any of the Worklet-based destinations (including subclasses like AudioWorklet), and the Worker-based destinations, including ServiceWorker and SharedWorker.

Value

A string which indicates the type of content the request is asking for. This type is much broader than the usual document type values (such as "document" or "manifest"), and may include contextual cues such as "image" or "worker" or "audioworklet".

Possible values are:

""

The empty string is the default value, and is used for destinations that do not have their own value. This is the value when requests are made using the following APIs (among others):

"audio"

The target is audio data.

"audioworklet"

The target is data being fetched for use by an audio worklet.

"document"

The target is a document (HTML or XML).

"embed"

The target is embedded content.

"fencedframe"

The target is a fenced frame.

"font"

The target is a font.

"image"

The target is an image.

"json"

The target is a JSON file.

"manifest"

The target is a manifest.

"object"

The target is an object.

"paintworklet"

The target is a paint worklet.

"report"

The target is a report.

"script"

The target is a script.

"serviceworker"

The target is a service worker.

"sharedworker"

The target is a shared worker.

"speculationrules"

The target is a speculation rules JSON document.

"style"

The target is a style

"track"

The target is an HTML <track>.

"video"

The target is video data.

"worker"

The target is a worker.

"xslt"

The target is an XSLT transform.

Examples

In the following snippet, we create a new request using the Request() constructor (for an image file in the same directory as the script), then save the request's destination:

js
const myRequest = new Request("flowers.jpg");
const myDestination = myRequest.destination; // returns the empty string by default

Specifications

Specification
Fetch
# ref-for-dom-request-destination①

Browser compatibility

desktop mobile server
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Bun
Deno
Node.js
destination
Chrome – Full support
Chrome 65 (Release date: 2018-03-06)
footnote Full support
Edge – Full support
Edge 14 (Release date: 2016-08-02)
footnote Full support
Firefox – Full support
Firefox 61 (Release date: 2018-06-26)
footnote Full support
Opera – Full support
Opera 52 (Release date: 2018-03-22)
footnote Full support
Safari – Full support
Safari 10.1 (Release date: 2017-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 65 (Release date: 2018-03-06)
footnote Full support
Firefox for Android – Full support
Firefox for Android 61 (Release date: 2018-06-26)
footnote Full support
Opera Android – Full support
Opera Android 47 (Release date: 2018-07-23)
footnote Full support
Safari on iOS – Full support
Safari on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
Samsung Internet – Full support
Samsung Internet 9 (Release date: 2018-09-15)
footnote Full support
WebView Android – Full support
WebView Android 65 (Release date: 2018-03-06)
footnote Full support
WebView on iOS – Full support
WebView on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
Bun – Full support
Bun 1 (Release date: 2023-09-08)
footnote Full support
Deno – No support
Deno
footnote No support
Node.js – Full support
Node.js 18 (Release date: 2022-04-19)
footnote Full support
speculationrules value
Experimental
Chrome – Full support
Chrome 121 (Release date: 2024-01-23)
footnote Full support
Edge – Full support
Edge 121 (Release date: 2024-01-25)
footnote Full support
Firefox – No support
Firefox
footnote No support
Opera – Full support
Opera 107 (Release date: 2024-02-07)
footnote Full support
Safari – No support
Safari 26.2 (Release date: 2025-12-12)
disabled
disabled From version 26.2 users must explicitly set the SpeculationRules prefetch preference.
Chrome Android – Full support
Chrome Android 121 (Release date: 2024-01-23)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote No support
Opera Android – Full support
Opera Android 81 (Release date: 2024-03-14)
footnote Full support
Safari on iOS – No support
Safari on iOS 26.2 (Release date: 2025-12-12)
disabled
disabled From version 26.2 users must explicitly set the SpeculationRules prefetch preference.
Samsung Internet – Full support
Samsung Internet 25 (Release date: 2024-04-24)
footnote Full support
WebView Android – Full support
WebView Android 121 (Release date: 2024-01-23)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
Bun – No support
Bun
footnote No support
Deno – No support
Deno
footnote No support
Node.js – No support
Node.js
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Experimental. Expect behavior to change in the future.
User must explicitly enable this feature.

See also