chrome.declarativeWebRequest library

Note: this API is currently on hold, without concrete plans to move to stable. Use the chrome.declarativeWebRequest API to intercept, block, or modify requests in-flight. It is significantly faster than the chrome.webRequest API because you can register rules that are evaluated in the browser rather than the JavaScript engine with reduces roundtrip latencies and allows higher efficiency.

Classes

AddRequestCookie
Adds a cookie to the request or overrides a cookie, in case another cookie of the same name exists already. Note that it is preferred to use the Cookies API because this is computationally less expensive.
AddRequestCookieInstanceType
AddResponseCookie
Adds a cookie to the response or overrides a cookie, in case another cookie of the same name exists already. Note that it is preferred to use the Cookies API because this is computationally less expensive.
AddResponseCookieInstanceType
AddResponseHeader
Adds the response header to the response of this web request. As multiple response headers may share the same name, you need to first remove and then add a new response header in order to replace one.
AddResponseHeaderInstanceType
CancelRequest
Declarative event action that cancels a network request.
CancelRequestInstanceType
ChromeDeclarativeWebRequest
EditRequestCookie
Edits one or more cookies of request. Note that it is preferred to use the Cookies API because this is computationally less expensive.
EditRequestCookieInstanceType
EditResponseCookie
Edits one or more cookies of response. Note that it is preferred to use the Cookies API because this is computationally less expensive.
EditResponseCookieInstanceType
FilterResponseCookie
A filter of a cookie in HTTP Responses.
HeaderFilter
Filters request headers for various criteria. Multiple criteria are evaluated as a conjunction.
IgnoreRules
Masks all rules that match the specified criteria.
IgnoreRulesInstanceType
RedirectByRegEx
Redirects a request by applying a regular expression on the URL. The regular expressions use the RE2 syntax.
RedirectByRegExInstanceType
RedirectRequest
Declarative event action that redirects a network request.
RedirectRequestInstanceType
RedirectToEmptyDocument
Declarative event action that redirects a network request to an empty document.
RedirectToEmptyDocumentInstanceType
RedirectToTransparentImage
Declarative event action that redirects a network request to a transparent image.
RedirectToTransparentImageInstanceType
RemoveRequestCookie
Removes one or more cookies of request. Note that it is preferred to use the Cookies API because this is computationally less expensive.
RemoveRequestCookieInstanceType
RemoveRequestHeader
Removes the request header of the specified name. Do not use SetRequestHeader and RemoveRequestHeader with the same header name on the same request. Each request header name occurs only once in each request.
RemoveRequestHeaderInstanceType
RemoveResponseCookie
Removes one or more cookies of response. Note that it is preferred to use the Cookies API because this is computationally less expensive.
RemoveResponseCookieInstanceType
RemoveResponseHeader
Removes all response headers of the specified names and values.
RemoveResponseHeaderInstanceType
RequestCookie
A filter or specification of a cookie in HTTP Requests.
RequestMatcher
Matches network events by various criteria.
RequestMatcherInstanceType
ResponseCookie
A specification of a cookie in HTTP Responses.
SendMessageToExtension
Triggers the declarativeWebRequest.onMessage event.
SendMessageToExtensionInstanceType
SetRequestHeader
Sets the request header of the specified name to the specified value. If a header with the specified name did not exist before, a new one is created. Header name comparison is always case-insensitive. Each request header name occurs only once in each request.
SetRequestHeaderInstanceType
Stage

Properties

declarativeWebRequest ChromeDeclarativeWebRequest
Accessor for the chrome.declarativeWebRequest namespace.
final