stable (1.2) latest (tip-of-tree) v8-inspector (node) Home Domains Accessibility Animation ApplicationCache CSS CacheStorage Console DOM DOMDebugger DOMStorage Database Debugger DeviceOrientation Emulation HeapProfiler IO IndexedDB Input Inspector LayerTree Log Memory Network Page Profiler Rendering Runtime Schema Security ServiceWorker Storage SystemInfo Target Tethering Tracing
Chrome Debugging 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 specific URL from loading. Experimental

Parameters
urls
array [string] URLs to block.

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. setMonitoringXHREnabled

Toggles monitoring of XMLHttpRequest. If true, console will receive messages upon each XHR issued. Experimental

Parameters
enabled
boolean Monitoring enabled state.

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. deleteCookie

Deletes browser cookie with given name, domain and path. Experimental

Parameters
cookieName
string Name of the cookie to remove.
url
string URL to match cooke domain and path.

Network. setCookie

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

Parameters
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.
name
string The name of the cookie.
value
string The value of the cookie.
domain
string If omitted, the cookie becomes a host-only cookie.
path
string Defaults to the path portion of the url parameter.
secure
boolean Defaults ot false.
httpOnly
boolean Defaults to false.
sameSite
CookieSameSite Defaults to browser default behavior.
expirationDate
Timestamp If omitted, the cookie becomes a session cookie.
Return object
success
boolean True if successfully set cookie.

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 Additional latency (ms).
downloadThroughput
number Maximal aggregated download throughput.
uploadThroughput
number Maximal aggregated upload throughput.
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]

Events

Network. resourceChangedPriority

Fired when resource loading priority is changed Experimental

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

Network. requestWillBeSent

Fired when page is about to send HTTP request.

Parameters
requestId
RequestId Request identifier.
frameId
Page.FrameId Frame identifier. Experimental
loaderId
LoaderId Loader identifier.
documentURL
string URL of the document this request is loaded for.
request
Request Request data.
timestamp
Timestamp Timestamp.
wallTime
Timestamp UTC Timestamp. Experimental
initiator
Initiator Request initiator.
redirectResponse
Response Redirect response data.
type
Page.ResourceType Type of this resource. 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.
frameId
Page.FrameId Frame identifier. Experimental
loaderId
LoaderId Loader identifier.
timestamp
Timestamp Timestamp.
type
Page.ResourceType Resource type.
response
Response Response data.

Network. dataReceived

Fired when data chunk was received over the network.

Parameters
requestId
RequestId Request identifier.
timestamp
Timestamp 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
Timestamp 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
Timestamp 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
Timestamp Timestamp.
wallTime
Timestamp UTC Timestamp. Experimental
request
WebSocketRequest WebSocket request data.

Network. webSocketHandshakeResponseReceived

Fired when WebSocket handshake response becomes available. Experimental

Parameters
requestId
RequestId Request identifier.
timestamp
Timestamp 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
Timestamp Timestamp.

Network. webSocketFrameReceived

Fired when WebSocket frame is received. Experimental

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

Network. webSocketFrameError

Fired when WebSocket frame error occurs. Experimental

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

Network. webSocketFrameSent

Fired when WebSocket frame is sent. Experimental

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

Network. eventSourceMessageReceived

Fired when EventSource message is received. Experimental

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

Types

LoaderId

Unique loader identifier.

Type: string

RequestId

Unique request identifier.

Type: string

Timestamp

Number of seconds since epoch.

Type: number

Headers

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

Type: object

ConnectionType

Loading priority of a resource request.

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
string The mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/ Allowed values: blockable, optionally-blockable, none.
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, no-referrer-when-downgrade-origin-when-cross-origin.

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
Timestamp 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
Timestamp Certificate valid from date.
validTo
Timestamp 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
number 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
number 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 only.
lineNumber
number Initiator line number, set for Parser type only (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.