stable (1.2) latest (tip-of-tree) v8-inspector (node) Home
Domains
Accessibility Animation ApplicationCache Audits Browser CSS CacheStorage Console DOM DOMDebugger DOMSnapshot DOMStorage Database Debugger DeviceOrientation Emulation HeadlessExperimental HeapProfiler IO IndexedDB Input Inspector LayerTree Log Memory Network Overlay Page Performance Profiler Runtime Schema Security ServiceWorker Storage SystemInfo Target Tethering Tracing
Chrome DevTools Protocol Viewer - latest (tip-of-tree)

Network Domain

Network domain allows tracking network activities of the page. It exposes information about http, file, data and other requests and responses, their headers, bodies, timing, etc.

Methods

Network.enable

Enables network tracking, network events will now be delivered to the client.

Parameters
maxTotalBufferSize
integer Buffer size in bytes to use when preserving network payloads (XHRs, etc). Experimental
maxResourceBufferSize
integer Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). Experimental

Network.disable

Disables network tracking, prevents network events from being sent to the client.

Network.setUserAgentOverride

Allows overriding user agent with the given string.

Parameters
userAgent
string User agent to use.

Network.setExtraHTTPHeaders

Specifies whether to always send extra HTTP headers with the requests from this page.

Parameters
headers
Headers Map with extra HTTP headers.

Network.getResponseBody

Returns content served for the given request.

Parameters
requestId
RequestId Identifier of the network request to get content for.
Return object
body
string Response body.
base64Encoded
boolean True, if content was sent as base64.

Network.setBlockedURLs

Blocks URLs from loading. Experimental

Parameters
urls
array [string] URL patterns to block. Wildcards ('*') are allowed.

Network.replayXHR

This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password. Experimental

Parameters
requestId
RequestId Identifier of XHR to replay.

Network.canClearBrowserCache

Tells whether clearing browser cache is supported.

Return object
result
boolean True if browser cache can be cleared.

Network.clearBrowserCache

Clears browser cache.

Network.canClearBrowserCookies

Tells whether clearing browser cookies is supported.

Return object
result
boolean True if browser cookies can be cleared.

Network.clearBrowserCookies

Clears browser cookies.

Network.getCookies

Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the cookies field. Experimental

Parameters
urls
array [string] The list of URLs for which applicable cookies will be fetched
Return object
cookies
array [ Cookie ] Array of cookie objects.

Network.getAllCookies

Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the cookies field. Experimental

Return object
cookies
array [ Cookie ] Array of cookie objects.

Network.deleteCookies

Deletes browser cookies with matching name and url or domain/path pair. Experimental

Parameters
name
string Name of the cookies to remove.
url
string If specified, deletes all the cookies with the given name where domain and path match provided URL.
domain
string If specified, deletes only cookies with the exact domain.
path
string If specified, deletes only cookies with the exact path.

Network.setCookie

Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. Experimental

Parameters
name
string Cookie name.
value
string Cookie value.
url
string The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie.
domain
string Cookie domain.
path
string Cookie path.
secure
boolean True if cookie is secure.
httpOnly
boolean True if cookie is http-only.
sameSite
CookieSameSite Cookie SameSite type.
expires
TimeSinceEpoch Cookie expiration date, session cookie if not set
Return object
success
boolean True if successfully set cookie.

Network.setCookies

Sets given cookies. Experimental

Parameters
cookies
array [ CookieParam ] Cookies to be set.

Network.canEmulateNetworkConditions

Tells whether emulation of network conditions is supported. Experimental

Return object
result
boolean True if emulation of network conditions is supported.

Network.emulateNetworkConditions

Activates emulation of network conditions.

Parameters
offline
boolean True to emulate internet disconnection.
latency
number Minimum latency from request sent to response headers received (ms).
downloadThroughput
number Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
uploadThroughput
number Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling.
connectionType
ConnectionType Connection type if known.

Network.setCacheDisabled

Toggles ignoring cache for each request. If true, cache will not be used.

Parameters
cacheDisabled
boolean Cache disabled state.

Network.setBypassServiceWorker

Toggles ignoring of service worker for each request. Experimental

Parameters
bypass
boolean Bypass service worker and load from network.

Network.setDataSizeLimitsForTest

For testing. Experimental

Parameters
maxTotalSize
integer Maximum total buffer size.
maxResourceSize
integer Maximum per-resource size.

Network.getCertificate

Returns the DER-encoded certificate. Experimental

Parameters
origin
string Origin to get certificate for.
Return object
tableNames
array [string]

Network.setRequestInterceptionEnabled

Sets the requests to intercept that match a the provided patterns and optionally resource types. Experimental

Parameters
enabled
boolean Whether requests should be intercepted. If patterns is not set, matches all and resets any previously set patterns. Other parameters are ignored if false.
patterns
array [string] URLs matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call. Wildcards ('*' -> zero or more, '?' -> exactly one) are allowed. Escape character is backslash. If omitted equivalent to ['*'] (intercept all).
resourceTypes
array [ Page.ResourceType ] If set, only requests for matching resource types will be intercepted.

Network.continueInterceptedRequest

Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId. Experimental

Parameters
interceptionId
InterceptionId
errorReason
ErrorReason If set this causes the request to fail with the given reason. Passing Aborted for requests marked with isNavigationRequest also cancels the navigation. Must not be set in response to an authChallenge.
rawResponse
string If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge.
url
string If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge.
method
string If set this allows the request method to be overridden. Must not be set in response to an authChallenge.
postData
string If set this allows postData to be set. Must not be set in response to an authChallenge.
headers
Headers If set this allows the request headers to be changed. Must not be set in response to an authChallenge.
authChallengeResponse
AuthChallengeResponse Response to a requestIntercepted with an authChallenge. Must not be set otherwise.

Events

Network.resourceChangedPriority

Fired when resource loading priority is changed Experimental

Parameters
requestId
RequestId Request identifier.
newPriority
ResourcePriority New priority
timestamp
MonotonicTime Timestamp.

Network.requestWillBeSent

Fired when page is about to send HTTP request.

Parameters
requestId
RequestId Request identifier.
loaderId
LoaderId Loader identifier. Empty string if the request is fetched form worker.
documentURL
string URL of the document this request is loaded for.
request
Request Request data.
timestamp
MonotonicTime Timestamp.
wallTime
TimeSinceEpoch Timestamp. Experimental
initiator
Initiator Request initiator.
redirectResponse
Response Redirect response data.
type
Page.ResourceType Type of this resource. Experimental
frameId
Page.FrameId Frame identifier. Experimental

Network.requestServedFromCache

Fired if request ended up loading from cache.

Parameters
requestId
RequestId Request identifier.

Network.responseReceived

Fired when HTTP response is available.

Parameters
requestId
RequestId Request identifier.
loaderId
LoaderId Loader identifier. Empty string if the request is fetched form worker.
timestamp
MonotonicTime Timestamp.
type
Page.ResourceType Resource type.
response
Response Response data.
frameId
Page.FrameId Frame identifier. Experimental

Network.dataReceived

Fired when data chunk was received over the network.

Parameters
requestId
RequestId Request identifier.
timestamp
MonotonicTime Timestamp.
dataLength
integer Data chunk length.
encodedDataLength
integer Actual bytes received (might be less than dataLength for compressed encodings).

Network.loadingFinished

Fired when HTTP request has finished loading.

Parameters
requestId
RequestId Request identifier.
timestamp
MonotonicTime Timestamp.
encodedDataLength
number Total number of bytes received for this request.

Network.loadingFailed

Fired when HTTP request has failed to load.

Parameters
requestId
RequestId Request identifier.
timestamp
MonotonicTime Timestamp.
type
Page.ResourceType Resource type.
errorText
string User friendly error message.
canceled
boolean True if loading was canceled.
blockedReason
BlockedReason The reason why loading was blocked, if any. Experimental

Network.webSocketWillSendHandshakeRequest

Fired when WebSocket is about to initiate handshake. Experimental

Parameters
requestId
RequestId Request identifier.
timestamp
MonotonicTime Timestamp.
wallTime
TimeSinceEpoch UTC Timestamp. Experimental
request
WebSocketRequest WebSocket request data.

Network.webSocketHandshakeResponseReceived

Fired when WebSocket handshake response becomes available. Experimental

Parameters
requestId
RequestId Request identifier.
timestamp
MonotonicTime Timestamp.
response
WebSocketResponse WebSocket response data.

Network.webSocketCreated

Fired upon WebSocket creation. Experimental

Parameters
requestId
RequestId Request identifier.
url
string WebSocket request URL.
initiator
Initiator Request initiator.

Network.webSocketClosed

Fired when WebSocket is closed. Experimental

Parameters
requestId
RequestId Request identifier.
timestamp
MonotonicTime Timestamp.

Network.webSocketFrameReceived

Fired when WebSocket frame is received. Experimental

Parameters
requestId
RequestId Request identifier.
timestamp
MonotonicTime Timestamp.
response
WebSocketFrame WebSocket response data.

Network.webSocketFrameError

Fired when WebSocket frame error occurs. Experimental

Parameters
requestId
RequestId Request identifier.
timestamp
MonotonicTime Timestamp.
errorMessage
string WebSocket frame error message.

Network.webSocketFrameSent

Fired when WebSocket frame is sent. Experimental

Parameters
requestId
RequestId Request identifier.
timestamp
MonotonicTime Timestamp.
response
WebSocketFrame WebSocket response data.

Network.eventSourceMessageReceived

Fired when EventSource message is received. Experimental

Parameters
requestId
RequestId Request identifier.
timestamp
MonotonicTime Timestamp.
eventName
string Message type.
eventId
string Message identifier.
data
string Message content.

Network.requestIntercepted

Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Experimental

Parameters
interceptionId
InterceptionId Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used.
request
Request
resourceType
Page.ResourceType How the requested resource will be used.
isNavigationRequest
boolean Whether this is a navigation request, which can abort the navigation completely.
redirectHeaders
Headers HTTP response headers, only sent if a redirect was intercepted.
redirectStatusCode
integer HTTP response code, only sent if a redirect was intercepted.
redirectUrl
string Redirect location, only sent if a redirect was intercepted.
authChallenge
AuthChallenge Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse.

Types

LoaderId

Unique loader identifier.

Type: string

RequestId

Unique request identifier.

Type: string

InterceptionId

Unique intercepted request identifier.

Type: string

ErrorReason

Network level fetch failure reason.

Type: string

Allowed values

Failed, Aborted, TimedOut, AccessDenied, ConnectionClosed, ConnectionReset, ConnectionRefused, ConnectionAborted, ConnectionFailed, NameNotResolved, InternetDisconnected, AddressUnreachable.

TimeSinceEpoch

UTC time in seconds, counted from January 1, 1970.

Type: number

MonotonicTime

Monotonically increasing time in seconds since an arbitrary point in the past.

Type: number

Headers

Request / response headers as keys / values of JSON object.

Type: object

ConnectionType

The underlying connection technology that the browser is supposedly using.

Type: string

Allowed values

none, cellular2g, cellular3g, cellular4g, bluetooth, ethernet, wifi, wimax, other.

CookieSameSite

Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies

Type: string

Allowed values

Strict, Lax.

ResourceTiming

Timing information for the request.

Type: object

Properties
requestTime
number Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.
proxyStart
number Started resolving proxy.
proxyEnd
number Finished resolving proxy.
dnsStart
number Started DNS address resolve.
dnsEnd
number Finished DNS address resolve.
connectStart
number Started connecting to the remote host.
connectEnd
number Connected to the remote host.
sslStart
number Started SSL handshake.
sslEnd
number Finished SSL handshake.
workerStart
number Started running ServiceWorker. Experimental
workerReady
number Finished Starting ServiceWorker. Experimental
sendStart
number Started sending request.
sendEnd
number Finished sending request.
pushStart
number Time the server started pushing request. Experimental
pushEnd
number Time the server finished pushing request. Experimental
receiveHeadersEnd
number Finished receiving response headers.

ResourcePriority

Loading priority of a resource request.

Type: string

Allowed values

VeryLow, Low, Medium, High, VeryHigh.

Request

HTTP request data.

Type: object

Properties
url
string Request URL.
method
string HTTP request method.
headers
Headers HTTP request headers.
postData
string HTTP POST request data.
mixedContentType
Security.MixedContentType The mixed content type of the request.
initialPriority
ResourcePriority Priority of the resource request at the time request is sent.
referrerPolicy
string The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/ Allowed values: unsafe-url, no-referrer-when-downgrade, no-referrer, origin, origin-when-cross-origin, same-origin, strict-origin, strict-origin-when-cross-origin.
isLinkPreload
boolean Whether is loaded via link preload.

SignedCertificateTimestamp

Details of a signed certificate timestamp (SCT).

Type: object

Properties
status
string Validation status.
origin
string Origin.
logDescription
string Log name / description.
logId
string Log ID.
timestamp
TimeSinceEpoch Issuance date.
hashAlgorithm
string Hash algorithm.
signatureAlgorithm
string Signature algorithm.
signatureData
string Signature data.

SecurityDetails

Security details about a request.

Type: object

Properties
protocol
string Protocol name (e.g. "TLS 1.2" or "QUIC").
keyExchange
string Key Exchange used by the connection, or the empty string if not applicable.
keyExchangeGroup
string (EC)DH group used by the connection, if applicable.
cipher
string Cipher name.
mac
string TLS MAC. Note that AEAD ciphers do not have separate MACs.
certificateId
Security.CertificateId Certificate ID value.
subjectName
string Certificate subject name.
sanList
array [string] Subject Alternative Name (SAN) DNS names and IP addresses.
issuer
string Name of the issuing CA.
validFrom
TimeSinceEpoch Certificate valid from date.
validTo
TimeSinceEpoch Certificate valid to (expiration) date
signedCertificateTimestampList
array [ SignedCertificateTimestamp ] List of signed certificate timestamps (SCTs).

BlockedReason

The reason why request was blocked. Experimental

Type: string

Allowed values

csp, mixed-content, origin, inspector, subresource-filter, other.

Response

HTTP response data.

Type: object

Properties
url
string Response URL. This URL can be different from CachedResource.url in case of redirect.
status
integer HTTP response status code.
statusText
string HTTP response status text.
headers
Headers HTTP response headers.
headersText
string HTTP response headers text.
mimeType
string Resource mimeType as determined by the browser.
requestHeaders
Headers Refined HTTP request headers that were actually transmitted over the network.
requestHeadersText
string HTTP request headers text.
connectionReused
boolean Specifies whether physical connection was actually reused for this request.
connectionId
number Physical connection id that was actually used for this request.
remoteIPAddress
string Remote IP address. Experimental
remotePort
integer Remote port. Experimental
fromDiskCache
boolean Specifies that the request was served from the disk cache.
fromServiceWorker
boolean Specifies that the request was served from the ServiceWorker.
encodedDataLength
number Total number of bytes received for this request so far.
timing
ResourceTiming Timing information for the given request.
protocol
string Protocol used to fetch this request.
securityState
Security.SecurityState Security state of the request resource.
securityDetails
SecurityDetails Security details for the request.

WebSocketRequest

WebSocket request data. Experimental

Type: object

Properties
headers
Headers HTTP request headers.

WebSocketResponse

WebSocket response data. Experimental

Type: object

Properties
status
integer HTTP response status code.
statusText
string HTTP response status text.
headers
Headers HTTP response headers.
headersText
string HTTP response headers text.
requestHeaders
Headers HTTP request headers.
requestHeadersText
string HTTP request headers text.

WebSocketFrame

WebSocket frame data. Experimental

Type: object

Properties
opcode
number WebSocket frame opcode.
mask
boolean WebSocke frame mask.
payloadData
string WebSocke frame payload data.

CachedResource

Information about the cached resource.

Type: object

Properties
url
string Resource URL. This is the url of the original network request.
type
Page.ResourceType Type of this resource.
response
Response Cached response data.
bodySize
number Cached response body size.

Initiator

Information about the request initiator.

Type: object

Properties
type
string Type of this initiator. Allowed values: parser, script, preload, other.
stack
Runtime.StackTrace Initiator JavaScript stack trace, set for Script only.
url
string Initiator URL, set for Parser type or for Script type (when script is importing module).
lineNumber
number Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based).

Cookie object Experimental

Type: object

Properties
name
string Cookie name.
value
string Cookie value.
domain
string Cookie domain.
path
string Cookie path.
expires
number Cookie expiration date as the number of seconds since the UNIX epoch.
size
integer Cookie size.
httpOnly
boolean True if cookie is http-only.
secure
boolean True if cookie is secure.
session
boolean True in case of session cookie.
sameSite
CookieSameSite Cookie SameSite type.

CookieParam

Cookie parameter object Experimental

Type: object

Properties
name
string Cookie name.
value
string Cookie value.
url
string The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie.
domain
string Cookie domain.
path
string Cookie path.
secure
boolean True if cookie is secure.
httpOnly
boolean True if cookie is http-only.
sameSite
CookieSameSite Cookie SameSite type.
expires
TimeSinceEpoch Cookie expiration date, session cookie if not set

AuthChallenge

Authorization challenge for HTTP status code 401 or 407. Experimental

Type: object

Properties
source
string Source of the authentication challenge. Allowed values: Server, Proxy.
origin
string Origin of the challenger.
scheme
string The authentication scheme used, such as basic or digest
realm
string The realm of the challenge. May be empty.

AuthChallengeResponse

Response to an AuthChallenge. Experimental

Type: object

Properties
response
string The decision on what to do in response to the authorization challenge. Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box. Allowed values: Default, CancelAuth, ProvideCredentials.
username
string The username to provide, possibly empty. Should only be set if response is ProvideCredentials.
password
string The password to provide, possibly empty. Should only be set if response is ProvideCredentials.