The resource type of a request. Comparable to webRequest.ResourceType.
The resource type of a request. Comparable to webRequest.ResourceType.
Values of this type are strings. Possible values are:
beaconRequests sent through the Beacon API.
csp_reportRequests sent to the report-uri given in the Content-Security-Policy header, when an attempt to violate the policy is detected.
fontWeb fonts loaded for a @font-face CSS rule.
imageResources loaded to be rendered as image, except for imageset on browsers that support that type (see browser compatibility below).
imagesetImages loaded by a <picture> element or given in an <img> element's srcset attribute.
main_frameTop-level documents loaded into a tab.
mediaobjectResources loaded by an <object> or <embed> element.
Browsers that don't have a dedicated object_subrequest type (see browser compatibility below), also label subsequent requests sent by the plugin as object.
object_subrequestRequests sent by plugins.
pingRequests sent to the URL given in a hyperlink's ping attribute, when the hyperlink is followed.
Browsers that don't have a dedicated beacon type (see browser compatibility below), also label requests sent through the Beacon API as ping.
scriptCode that is loaded to be executed by a <script> element or running in a Worker.
speculativeIn a speculative connection, the browser has determined that a request to a URI may be coming soon, so it starts a TCP and/or TLS handshake immediately, so it is ready more quickly when the resource is actually requested. Note that this type of connection does not provide valid tab information, so request details such as tabId, frameId, parentFrameId, etc. are inaccurate.
stylesheetCSS stylesheets loaded to describe the representation of a document.
sub_frameweb_manifestWeb App Manifests loaded for websites that can be installed to the homescreen.
webbundleRequests initiating a connection to a server through a Web Bundle or packaged website.
websocketRequests initiating a connection to a server through the WebSocket API.
webtransportRequests initiating a connection to a server through the WebTransport API.
xml_dtdDTDs loaded for an XML document.
xmlhttprequestRequests sent by an XMLHttpRequest object or through the Fetch API.
xsltXSLT stylesheets loaded for transforming an XML document.
otherResources that aren't covered by any other available type.
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
ResourceType |
84 | 84 | No | ? | 70 | 15 | ? | ? | No | ? | 15 | ? |
beacon |
No | No | No | ? | No | No | ? | ? | No | ? | No | ? |
csp_report |
84 | 84 | No | ? | 70 | No | ? | ? | No | ? | No | ? |
font |
84 | 84 | No | ? | 70 | 15 | ? | ? | No | ? | 15 | ? |
image |
84 | 84 | No | ? | 70 | 15 | ? | ? | No | ? | 15 | ? |
imageset |
No | No | No | ? | No | NoUseimage instead. |
? | ? | No | ? | NoUseimage instead. |
? |
main_frame |
84 | 84 | No | ? | 70 | 15 | ? | ? | No | ? | 15 | ? |
media |
84 | 84 | No | ? | 70 | 15 | ? | ? | No | ? | 15 | ? |
object |
84 | 84 | No | ? | 70 | No | ? | ? | No | ? | No | ? |
object_subrequest |
No | No | No | ? | No | No | ? | ? | No | ? | No | ? |
other |
84 | 84 | No | ? | 70 | No | ? | ? | No | ? | No | ? |
ping |
84 | 84 | No | ? | 70 | 15 | ? | ? | No | ? | 15 | ? |
script |
84 | 84 | No | ? | 70 | 15 | ? | ? | No | ? | 15 | ? |
speculative |
No | No | No | ? | No | No | ? | ? | No | ? | No | ? |
stylesheet |
84 | 84 | No | ? | 70 | 15 | ? | ? | No | ? | 15 | ? |
sub_frame |
84 | 84 | No | ? | 70 | 15 | ? | ? | No | ? | 15 | ? |
web_manifest |
No | No | No | ? | No | No | ? | ? | No | ? | No | ? |
webbundle |
84 | 84 | No | ? | 70 | No | ? | ? | No | ? | No | ? |
websocket |
84 | 84 | No | ? | 70 | 15 | ? | ? | No | ? | 15 | ? |
webtransport |
84 | 84 | No | ? | 70 | No | ? | ? | No | ? | No | ? |
xml_dtd |
No | No | No | ? | No | No | ? | ? | No | ? | No | ? |
xmlhttprequest |
84 | 84 | No | ? | 70 | 15 | ? | ? | No | ? | 15 | ? |
xslt |
84 | 84 | No | ? | 70 | No | ? | ? | No | ? | No | ? |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/declarativeNetRequest/ResourceType