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.canClearBrowserCache
- Network.canClearBrowserCookies
- Network.clearBrowserCache
- Network.clearBrowserCookies
- Network.disable
- Network.emulateNetworkConditions
- Network.enable
- Network.getResponseBody
- Network.setCacheDisabled
- Network.setExtraHTTPHeaders
- Network.setUserAgentOverride
Events
- Network.dataReceived
- Network.loadingFailed
- Network.loadingFinished
- Network.requestServedFromCache
- Network.requestWillBeSent
- Network.responseReceived
Types
Methods
Network.canClearBrowserCache #
Tells whether clearing browser cache is supported.
Return object
result booleanTrue if browser cache can be cleared.
Network.canClearBrowserCookies #
Tells whether clearing browser cookies is supported.
Return object
result booleanTrue if browser cookies can be cleared.
Network.disable #
Disables network tracking, prevents network events from being sent to the client.
Network.disable support is experimental.
Disable network debugging. Returns false if not initially enabled.
@cdp Network.disable
Network.emulateNetworkConditions #
Activates emulation of network conditions.
Parameters
offline booleanTrue to emulate internet disconnection.
latency numberAdditional latency (ms).
downloadThroughput numberMaximal aggregated download throughput.
uploadThroughput numberMaximal aggregated upload throughput.
connectionTypeOptional
Connection type if known.
Network.enable #
Enables network tracking, network events will now be delivered to the client.
Network.enable support is experimental.
Enable network debugging. Returns false if already enabled.
@cdp Network.enable
Parameters
maxTotalBufferSizeOptional
integerBuffer size in bytes to use when preserving network payloads (XHRs, etc).
maxResourceBufferSizeOptional
integerPer-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
Network.getResponseBody #
Returns content served for the given request.
Network.getResponseBody support is experimental.
Parameters
requestId Identifier of the network request to get content for.
Return object
body stringResponse body.
base64Encoded booleanTrue, if content was sent as base64.
Network.setCacheDisabled #
Toggles ignoring cache for each request. If true, cache will not be used.
Parameters
cacheDisabled booleanCache disabled state.
Network.setExtraHTTPHeaders #
Specifies whether to always send extra HTTP headers with the requests from this page.
Parameters
headers Map with extra HTTP headers.
Network.setUserAgentOverride #
Allows overriding user agent with the given string.
Parameters
userAgent stringUser agent to use.
Events
Network.dataReceived #
Fired when data chunk was received over the network.
Network.dataReceived
Parameters
requestId Request identifier.
timestamp Timestamp.
dataLength integerData chunk length.
encodedDataLength integerActual bytes received (might be less than dataLength for compressed encodings).
Network.loadingFailed #
Fired when HTTP request has failed to load.
Network.loadingFailed
Parameters
requestId Request identifier.
timestamp Timestamp.
type Resource type.
errorText stringUser friendly error message.
canceledOptional
booleanTrue if loading was canceled.
blockedReasonOptional
Network.loadingFinished #
Fired when HTTP request has finished loading.
Network.loadingFinished
Parameters
requestId Request identifier.
timestamp Timestamp.
encodedDataLength numberTotal number of bytes received for this request.
Network.requestServedFromCache #
Fired if request ended up loading from cache.
Parameters
requestId Request identifier.
Network.requestWillBeSent #
Fired when page is about to send HTTP request.
Network.requestWillBeSent
Parameters
requestId Request identifier.
frameId loaderId Loader identifier.
documentURL stringURL of the document this request is loaded for.
request Request data.
timestamp Timestamp.
wallTime initiator Request initiator.
redirectResponseOptional
Redirect response data.
typeOptional
Types
Network.CachedResource #
Information about the cached resource.
Type: object
Properties
url stringResource URL. This is the url of the original network request.
type Type of this resource.
responseOptional
Cached response data.
bodySize numberCached response body size.
Network.ConnectionType #
Loading priority of a resource request.
Type: string
Allowed values: none, cellular2g, cellular3g, cellular4g, bluetooth, ethernet, wifi, wimax, other
Network.CookieSameSite #
Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies
Type: string
Allowed values: Strict, Lax
Network.Initiator #
Information about the request initiator.
Type: object
Properties
type stringType of this initiator.
Allowed values: parser, script, other
stackOptional
Initiator JavaScript stack trace, set for Script only.
urlOptional
stringInitiator URL, set for Parser type only.
lineNumberOptional
numberInitiator line number, set for Parser type only (0-based).
Network.Request #
HTTP request data.
Type: object
Properties
url stringRequest URL.
method stringHTTP request method.
headers HTTP request headers.
postDataOptional
stringHTTP POST request data.
mixedContentTypeOptional
stringThe mixed content status of the request, as defined in http://www.w3.org/TR/mixed-content/
Allowed values: blockable, optionally-blockable, none
initialPriority Priority of the resource request at the time request is sent.
Network.ResourcePriority #
Loading priority of a resource request.
Type: string
Allowed values: VeryLow, Low, Medium, High, VeryHigh
Network.ResourceTiming #
Timing information for the request.
Type: object
Properties
requestTime numberTiming's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.
proxyStart numberStarted resolving proxy.
proxyEnd numberFinished resolving proxy.
dnsStart numberStarted DNS address resolve.
dnsEnd numberFinished DNS address resolve.
connectStart numberStarted connecting to the remote host.
connectEnd numberConnected to the remote host.
sslStart numberStarted SSL handshake.
sslEnd numberFinished SSL handshake.
workerStart numberStarted running ServiceWorker.
workerReady numberFinished Starting ServiceWorker.
sendStart numberStarted sending request.
sendEnd numberFinished sending request.
pushStart numberTime the server started pushing request.
pushEnd numberTime the server finished pushing request.
receiveHeadersEnd numberFinished receiving response headers.
Network.Response #
HTTP response data.
Type: object
Properties
url stringResponse URL. This URL can be different from CachedResource.url in case of redirect.
status numberHTTP response status code.
statusText stringHTTP response status text.
headers HTTP response headers.
headersTextOptional
stringHTTP response headers text.
mimeType stringResource mimeType as determined by the browser.
requestHeadersOptional
Refined HTTP request headers that were actually transmitted over the network.
requestHeadersTextOptional
stringHTTP request headers text.
connectionReused booleanSpecifies whether physical connection was actually reused for this request.
connectionId numberPhysical connection id that was actually used for this request.
remoteIPAddressOptional
stringRemote IP address.
remotePortOptional
integerRemote port.
fromDiskCacheOptional
booleanSpecifies that the request was served from the disk cache.
fromServiceWorkerOptional
booleanSpecifies that the request was served from the ServiceWorker.
encodedDataLength numberTotal number of bytes received for this request so far.
timingOptional
Timing information for the given request.
protocolOptional
stringProtocol used to fetch this request.
securityState Security state of the request resource.
securityDetailsOptional
Security details for the request.
Network.SecurityDetails #
Security details about a request.
Type: object
Properties
protocol stringProtocol name (e.g. "TLS 1.2" or "QUIC").
keyExchange stringKey Exchange used by the connection.
keyExchangeGroupOptional
string(EC)DH group used by the connection, if applicable.
cipher stringCipher name.
macOptional
stringTLS MAC. Note that AEAD ciphers do not have separate MACs.
certificateId Certificate ID value.
subjectName stringCertificate subject name.
sanList array[ string ]Subject Alternative Name (SAN) DNS names and IP addresses.
issuer stringName of the issuing CA.
validFrom Certificate valid from date.
validTo Certificate valid to (expiration) date
signedCertificateTimestampList array[ SignedCertificateTimestamp ]List of signed certificate timestamps (SCTs).
Network.SignedCertificateTimestamp #
Details of a signed certificate timestamp (SCT).
Type: object
Properties
status stringValidation status.
origin stringOrigin.
logDescription stringLog name / description.
logId stringLog ID.
timestamp Issuance date.
hashAlgorithm stringHash algorithm.
signatureAlgorithm stringSignature algorithm.
signatureData stringSignature data.