Chrome DevTools Protocol

Methods

Audits.disable

Disables issues domain, prevents further issues from being reported to the client.

Audits.enable

Enables issues domain, sends the issues collected so far to the client by means of the issueAdded event.

Audits.getEncodedResponse

Returns the response body and size if it were re-encoded with the specified settings. Only applies to images.

parameters
requestId
Network.RequestId

Identifier of the network request to get content for.

encoding
string

The encoding to use.

Allowed Values: webp, jpeg, png
quality
number

The quality of the encoding (0-1). (defaults to 1)

sizeOnly
boolean

Whether to only return the size information (defaults to false).

Return Object
body
string

The encoded body as a base64 string. Omitted if sizeOnly is true.

originalSize
integer

Size before re-encoding.

encodedSize
integer

Size after re-encoding.

Events

Audits.issueAdded

parameters
issue
InspectorIssue

Types

Audits.AffectedCookie

Information about a cookie that is affected by an inspector issue.

Type: object

properties
name
string

The following three properties uniquely identify a cookie

path
string
domain
string

Audits.AffectedFrame

Information about the frame affected by an inspector issue.

Type: object

properties
frameId
Page.FrameId

Audits.AffectedRequest

Information about a request that is affected by an inspector issue.

Type: object

properties
requestId
Network.RequestId

The unique request id.

url
string

Audits.BlockedByResponseIssueDetails

Details for a request that has been blocked with the BLOCKED_BY_RESPONSE code. Currently only used for COEP/COOP, but may be extended to include some CSP errors in the future.

Type: object

properties
request
AffectedRequest
frame
AffectedFrame
reason
BlockedByResponseReason

Audits.BlockedByResponseReason

Enum indicating the reason a response has been blocked. These reasons are refinements of the net error BLOCKED_BY_RESPONSE.

Allowed Values: CoepFrameResourceNeedsCoepHeader, CoopSandboxedIFrameCannotNavigateToCoopPage, CorpNotSameOrigin, CorpNotSameOriginAfterDefaultedToSameOriginByCoep, CorpNotSameSite

Type: string

Audits.InspectorIssue

An inspector issue reported from the back-end.

Type: object

properties
code
InspectorIssueCode
details
InspectorIssueDetails

Audits.InspectorIssueCode

A unique identifier for the type of issue. Each type may use one of the optional fields in InspectorIssueDetails to convey more specific information about the kind of issue.

Allowed Values: SameSiteCookieIssue, MixedContentIssue, BlockedByResponseIssue

Type: string

Audits.InspectorIssueDetails

This struct holds a list of optional fields with additional information specific to the kind of issue. When adding a new issue code, please also add a new optional field to this type.

Type: object

properties
sameSiteCookieIssueDetails
SameSiteCookieIssueDetails
mixedContentIssueDetails
MixedContentIssueDetails
blockedByResponseIssueDetails
BlockedByResponseIssueDetails

Audits.MixedContentIssueDetails

Type: object

properties
resourceType
MixedContentResourceType

The type of resource causing the mixed content issue (css, js, iframe, form,...). Marked as optional because it is mapped to from blink::mojom::RequestContextType, which will be replaced by network::mojom::RequestDestination

resolutionStatus
MixedContentResolutionStatus

The way the mixed content issue is being resolved.

insecureURL
string

The unsafe http url causing the mixed content issue.

mainResourceURL
string

The url responsible for the call to an unsafe url.

request
AffectedRequest

The mixed content request. Does not always exist (e.g. for unsafe form submission urls).

frame
AffectedFrame

Optional because not every mixed content issue is necessarily linked to a frame.

Audits.MixedContentResolutionStatus

Allowed Values: MixedContentBlocked, MixedContentAutomaticallyUpgraded, MixedContentWarning

Type: string

Audits.MixedContentResourceType

Allowed Values: Audio, Beacon, CSPReport, Download, EventSource, Favicon, Font, Form, Frame, Image, Import, Manifest, Ping, PluginData, PluginResource, Prefetch, Resource, Script, ServiceWorker, SharedWorker, Stylesheet, Track, Video, Worker, XMLHttpRequest, XSLT

Type: string

Audits.SameSiteCookieExclusionReason

Allowed Values: ExcludeSameSiteUnspecifiedTreatedAsLax, ExcludeSameSiteNoneInsecure

Type: string

Audits.SameSiteCookieIssueDetails

This information is currently necessary, as the front-end has a difficult time finding a specific cookie. With this, we can convey specific error information without the cookie.

Type: object

properties
cookie
AffectedCookie
cookieWarningReasons
array[ SameSiteCookieWarningReason ]
cookieExclusionReasons
array[ SameSiteCookieExclusionReason ]
operation
SameSiteCookieOperation

Optionally identifies the site-for-cookies and the cookie url, which may be used by the front-end as additional context.

siteForCookies
string
cookieUrl
string
request
AffectedRequest

Audits.SameSiteCookieOperation

Allowed Values: SetCookie, ReadCookie

Type: string

Audits.SameSiteCookieWarningReason

Allowed Values: WarnSameSiteUnspecifiedCrossSiteContext, WarnSameSiteNoneInsecure, WarnSameSiteUnspecifiedLaxAllowUnsafe, WarnSameSiteStrictLaxDowngradeStrict, WarnSameSiteStrictCrossDowngradeStrict, WarnSameSiteStrictCrossDowngradeLax, WarnSameSiteLaxCrossDowngradeStrict, WarnSameSiteLaxCrossDowngradeLax

Type: string