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
Events
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.clearBrowserCache #
Clears browser cache.
Network.clearBrowserCookies #
Clears browser cookies.
Network.disable #
Disables network tracking, prevents network events from being sent to the client.
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.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).
- maxResourceBufferSize
-
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
-
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 <code>true</code>, 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
-
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.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.
Network.requestServedFromCache #
Fired if request ended up loading from cache.
parameters
- requestId
-
RequestId
Request identifier.
Network.requestWillBeSent #
Fired when page is about to send HTTP request.
parameters
- requestId
-
RequestId
Request identifier.
- frameId
-
Page.FrameId
Frame identifier.
- 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.
- initiator
-
Initiator
Request initiator.
- redirectResponse
-
Response
Redirect response data.
- type
-
Page.ResourceType
Type of this resource.
Network.responseReceived #
Fired when HTTP response is available.
parameters
- requestId
-
RequestId
Request identifier.
- frameId
-
Page.FrameId
Frame identifier.
- loaderId
-
LoaderId
Loader identifier.
- timestamp
-
Timestamp
Timestamp.
- type
-
Page.ResourceType
Resource type.
- response
-
Response
Response data.
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
-
Page.ResourceType
Type of this resource.
- response
-
Response
Cached response data.
- bodySize
-
number
Cached response body size.
Network.ConnectionType #
Loading priority of a resource request.
none
, cellular2g
, cellular3g
, cellular4g
, bluetooth
, ethernet
, wifi
, wimax
, other
Type: string
Network.CookieSameSite #
Represents the cookie's 'SameSite' status: https://tools.ietf.org/html/draft-west-first-party-cookies
Strict
, Lax
Type: string
Network.Initiator #
Information about the request initiator.
Type: object
properties
- type
-
string
Type of this initiator.
Allowed Values:parser
,script
,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).
Network.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.
Network.ResourcePriority #
Loading priority of a resource request.
VeryLow
, Low
, Medium
, High
, VeryHigh
Type: string
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
-
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.
- remotePort
-
integer
Remote port.
- 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.
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
-
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).
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
-
Timestamp
Issuance date.
- hashAlgorithm
-
string
Hash algorithm.
- signatureAlgorithm
-
string
Signature algorithm.
- signatureData
-
string
Signature data.