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
boolean
True if browser cache can be cleared.
Network.canClearBrowserCookies #
Tells whether clearing browser cookies is supported.
Return object
result
boolean
True if browser cookies can be cleared.
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
Optional
Connection type if known.
Network.enable #
Enables network tracking, network events will now be delivered to the client.
Parameters
maxTotalBufferSize
Optional
integer
Buffer size in bytes to use when preserving network payloads (XHRs, etc).
maxResourceBufferSize
Optional
integer
Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
Network.getResponseBody #
Returns content served for the given request.
Parameters
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.setCacheDisabled #
Toggles ignoring cache for each request. If true, cache will not be used.
Parameters
cacheDisabled
boolean
Cache 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
string
User agent to use.
Events
Network.dataReceived #
Fired when data chunk was received over the network.
Parameters
requestId
Request identifier.
timestamp
Timestamp.
dataLength
integer
Data chunk length.
encodedDataLength
integer
Actual bytes received (might be less than dataLength for compressed encodings).
Network.loadingFailed #
Fired when HTTP request has failed to load.
Parameters
requestId
Request identifier.
timestamp
Timestamp.
type
Resource type.
errorText
string
User friendly error message.
canceled
Optional
boolean
True if loading was canceled.
blockedReason
Optional
Network.loadingFinished #
Fired when HTTP request has finished loading.
Parameters
requestId
Request identifier.
timestamp
Timestamp.
encodedDataLength
number
Total 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.
Parameters
requestId
Request identifier.
frameId
loaderId
Loader identifier.
documentURL
string
URL of the document this request is loaded for.
request
Request data.
timestamp
Timestamp.
wallTime
initiator
Request initiator.
redirectResponse
Optional
Redirect response data.
type
Optional
Types
Network.CachedResource #
Information about the cached resource.
Type: object
Properties
url
string
Resource URL. This is the url of the original network request.
type
Type of this resource.
response
Optional
Cached response data.
bodySize
number
Cached 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
string
Type of this initiator.
Allowed values: parser
, script
, other
stack
Optional
Initiator JavaScript stack trace, set for Script only.
url
Optional
string
Initiator URL, set for Parser type only.
lineNumber
Optional
number
Initiator line number, set for Parser type only (0-based).
Network.Request #
HTTP request data.
Type: object
Properties
url
string
Request URL.
method
string
HTTP request method.
headers
HTTP request headers.
postData
Optional
string
HTTP POST request data.
mixedContentType
Optional
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
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
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.
workerReady
number
Finished Starting ServiceWorker.
sendStart
number
Started sending request.
sendEnd
number
Finished sending request.
pushStart
number
Time the server started pushing request.
pushEnd
number
Time the server finished pushing request.
receiveHeadersEnd
number
Finished receiving response headers.
Network.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
HTTP response headers.
headersText
Optional
string
HTTP response headers text.
mimeType
string
Resource mimeType as determined by the browser.
requestHeaders
Optional
Refined HTTP request headers that were actually transmitted over the network.
requestHeadersText
Optional
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
Optional
string
Remote IP address.
remotePort
Optional
integer
Remote port.
fromDiskCache
Optional
boolean
Specifies that the request was served from the disk cache.
fromServiceWorker
Optional
boolean
Specifies that the request was served from the ServiceWorker.
encodedDataLength
number
Total number of bytes received for this request so far.
timing
Optional
Timing information for the given request.
protocol
Optional
string
Protocol used to fetch this request.
securityState
Security state of the request resource.
securityDetails
Optional
Security details for the request.
Network.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.
keyExchangeGroup
Optional
string
(EC)DH group used by the connection, if applicable.
cipher
string
Cipher name.
mac
Optional
string
TLS MAC. Note that AEAD ciphers do not have separate MACs.
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
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
string
Validation status.
origin
string
Origin.
logDescription
string
Log name / description.
logId
string
Log ID.
timestamp
Issuance date.
hashAlgorithm
string
Hash algorithm.
signatureAlgorithm
string
Signature algorithm.
signatureData
string
Signature data.