Preload
ExperimentalNo symbols match your filter.
Commands
Preload.enable
Preload.disable
Events
Preload.ruleSetUpdated
Upsert. Currently, it is only emitted when a rule set added.
Parameters
| Name | Type | Description |
|---|---|---|
ruleSet
|
RuleSet |
Preload.preloadEnabledStateUpdated
Fired when a preload enabled state is updated.
Parameters
| Name | Type | Description |
|---|---|---|
disabledByPreference
|
boolean |
|
disabledByDataSaver
|
boolean |
|
disabledByBatterySaver
|
boolean |
|
disabledByHoldbackPrefetchSpeculationRules
|
boolean |
|
disabledByHoldbackPrerenderSpeculationRules
|
boolean |
Preload.prefetchStatusUpdated
Fired when a prefetch attempt is updated.
Parameters
| Name | Type | Description |
|---|---|---|
key
|
PreloadingAttemptKey |
|
pipelineId
|
PreloadPipelineId |
|
initiatingFrameId
|
Page.FrameId |
The frame id of the frame initiating prefetch. |
prefetchUrl
|
string |
|
status
|
PreloadingStatus |
|
prefetchStatus
|
PrefetchStatus |
|
requestId
|
Network.RequestId |
Preload.prerenderStatusUpdated
Fired when a prerender attempt is updated.
Parameters
| Name | Type | Description |
|---|---|---|
key
|
PreloadingAttemptKey |
|
pipelineId
|
PreloadPipelineId |
|
status
|
PreloadingStatus |
|
prerenderStatus
(optional) |
PrerenderFinalStatus |
|
disallowedMojoInterface
(optional) |
string |
This is used to give users more information about the name of Mojo interface that is incompatible with prerender and has caused the cancellation of the attempt. |
mismatchedHeaders
(optional) |
array<PrerenderMismatchedHeaders> |
Preload.preloadingAttemptSourcesUpdated
Send a list of sources for all preloading attempts in a document.
Parameters
| Name | Type | Description |
|---|---|---|
loaderId
|
Network.LoaderId |
|
preloadingAttemptSources
|
array<PreloadingAttemptSource> |
Types
RuleSetId
(string)
Unique id
RuleSet
(object)
Corresponds to SpeculationRuleSet
Properties
| Name | Type | Description |
|---|---|---|
id
|
RuleSetId |
|
loaderId
|
Network.LoaderId |
Identifies a document which the rule set is associated with. |
sourceText
|
string |
Source text of JSON representing the rule set. If it comes from `<script>` tag, it is the textContent of the node. Note that it is a JSON for valid case. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html - https://github.com/WICG/nav-speculation/blob/main/triggers.md |
backendNodeId
(optional) |
DOM.BackendNodeId |
A speculation rule set is either added through an inline `<script>` tag or through an external resource via the 'Speculation-Rules' HTTP header. For the first case, we include the BackendNodeId of the relevant `<script>` tag. For the second case, we include the external URL where the rule set was loaded from, and also RequestId if Network domain is enabled. See also: - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header |
url
(optional) |
string |
|
requestId
(optional) |
Network.RequestId |
|
errorType
(optional) |
RuleSetErrorType |
Error information `errorMessage` is null iff `errorType` is null. |
errorMessage
(optional) Deprecated |
string |
TODO(https://crbug.com/1425354): Replace this property with structured error. |
tag
(optional) |
string |
For more details, see: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md |
RuleSetErrorType
(string)
Allowed Values
SourceIsNotJsonObjectInvalidRulesSkippedInvalidRulesetLevelTag
SpeculationAction
(string)
The type of preloading attempted. It corresponds to
mojom::SpeculationAction (although PrefetchWithSubresources is omitted as it
isn't being used by clients).
Allowed Values
PrefetchPrerenderPrerenderUntilScript
SpeculationTargetHint
(string)
Corresponds to mojom::SpeculationTargetHint.
See https://github.com/WICG/nav-speculation/blob/main/triggers.md#window-name-targeting-hints
Allowed Values
BlankSelf
PreloadingAttemptKey
(object)
A key that identifies a preloading attempt.
The url used is the url specified by the trigger (i.e. the initial URL), and
not the final url that is navigated to. For example, prerendering allows
same-origin main frame navigations during the attempt, but the attempt is
still keyed with the initial URL.
Properties
| Name | Type | Description |
|---|---|---|
loaderId
|
Network.LoaderId |
|
action
|
SpeculationAction |
|
url
|
string |
|
targetHint
(optional) |
SpeculationTargetHint |
PreloadingAttemptSource
(object)
Lists sources for a preloading attempt, specifically the ids of rule sets
that had a speculation rule that triggered the attempt, and the
BackendNodeIds of <a href> or <area href> elements that triggered the
attempt (in the case of attempts triggered by a document rule). It is
possible for multiple rule sets and links to trigger a single attempt.
Properties
| Name | Type | Description |
|---|---|---|
key
|
PreloadingAttemptKey |
|
ruleSetIds
|
array<RuleSetId> |
|
nodeIds
|
array<DOM.BackendNodeId> |
PreloadPipelineId
(string)
Chrome manages different types of preloads together using a
concept of preloading pipeline. For example, if a site uses a
SpeculationRules for prerender, Chrome first starts a prefetch and
then upgrades it to prerender.
CDP events for them are emitted separately but they share
`PreloadPipelineId`.
PrerenderFinalStatus
(string)
List of FinalStatus reasons for Prerender2.
Allowed Values
ActivatedDestroyedLowEndDeviceInvalidSchemeRedirectInvalidSchemeNavigationNavigationRequestBlockedByCspMojoBinderPolicyRendererProcessCrashedRendererProcessKilledDownloadTriggerDestroyedNavigationNotCommittedNavigationBadHttpStatusClientCertRequestedNavigationRequestNetworkErrorCancelAllHostsForTestingDidFailLoadStopSslCertificateErrorLoginAuthRequestedUaChangeRequiresReloadBlockedByClientAudioOutputDeviceRequestedMixedContentTriggerBackgroundedMemoryLimitExceededDataSaverEnabledTriggerUrlHasEffectiveUrlActivatedBeforeStartedInactivePageRestrictionStartFailedTimeoutBackgroundedCrossSiteRedirectInInitialNavigationCrossSiteNavigationInInitialNavigationSameSiteCrossOriginRedirectNotOptInInInitialNavigationSameSiteCrossOriginNavigationNotOptInInInitialNavigationActivationNavigationParameterMismatchActivatedInBackgroundEmbedderHostDisallowedActivationNavigationDestroyedBeforeSuccessTabClosedByUserGestureTabClosedWithoutUserGesturePrimaryMainFrameRendererProcessCrashedPrimaryMainFrameRendererProcessKilledActivationFramePolicyNotCompatiblePreloadingDisabledBatterySaverEnabledActivatedDuringMainFrameNavigationPreloadingUnsupportedByWebContentsCrossSiteRedirectInMainFrameNavigationCrossSiteNavigationInMainFrameNavigationSameSiteCrossOriginRedirectNotOptInInMainFrameNavigationSameSiteCrossOriginNavigationNotOptInInMainFrameNavigationMemoryPressureOnTriggerMemoryPressureAfterTriggeredPrerenderingDisabledByDevToolsSpeculationRuleRemovedActivatedWithAuxiliaryBrowsingContextsMaxNumOfRunningEagerPrerendersExceededMaxNumOfRunningNonEagerPrerendersExceededMaxNumOfRunningEmbedderPrerendersExceededPrerenderingUrlHasEffectiveUrlRedirectedPrerenderingUrlHasEffectiveUrlActivationUrlHasEffectiveUrlJavaScriptInterfaceAddedJavaScriptInterfaceRemovedAllPrerenderingCanceledWindowClosedSlowNetworkOtherPrerenderedPageActivatedV8OptimizerDisabledPrerenderFailedDuringPrefetchBrowsingDataRemovedPrerenderHostReused
PreloadingStatus
(string)
Preloading status values, see also PreloadingTriggeringOutcome. This
status is shared by prefetchStatusUpdated and prerenderStatusUpdated.
Allowed Values
PendingRunningReadySuccessFailureNotSupported
PrefetchStatus
(string)
TODO(https://crbug.com/1384419): revisit the list of PrefetchStatus and
filter out the ones that aren't necessary to the developers.
Allowed Values
PrefetchAllowedPrefetchFailedIneligibleRedirectPrefetchFailedInvalidRedirectPrefetchFailedMIMENotSupportedPrefetchFailedNetErrorPrefetchFailedNon2XXPrefetchEvictedAfterBrowsingDataRemovedPrefetchEvictedAfterCandidateRemovedPrefetchEvictedForNewerPrefetchPrefetchHeldbackPrefetchIneligibleRetryAfterPrefetchIsPrivacyDecoyPrefetchIsStalePrefetchNotEligibleBrowserContextOffTheRecordPrefetchNotEligibleDataSaverEnabledPrefetchNotEligibleExistingProxyPrefetchNotEligibleHostIsNonUniquePrefetchNotEligibleNonDefaultStoragePartitionPrefetchNotEligibleSameSiteCrossOriginPrefetchRequiredProxyPrefetchNotEligibleSchemeIsNotHttpsPrefetchNotEligibleUserHasCookiesPrefetchNotEligibleUserHasServiceWorkerPrefetchNotEligibleUserHasServiceWorkerNoFetchHandlerPrefetchNotEligibleRedirectFromServiceWorkerPrefetchNotEligibleRedirectToServiceWorkerPrefetchNotEligibleBatterySaverEnabledPrefetchNotEligiblePreloadingDisabledPrefetchNotFinishedInTimePrefetchNotStartedPrefetchNotUsedCookiesChangedPrefetchProxyNotAvailablePrefetchResponseUsedPrefetchSuccessfulButNotUsedPrefetchNotUsedProbeFailed
PrerenderMismatchedHeaders
(object)
Information of headers to be displayed when the header mismatch occurred.
Properties
| Name | Type | Description |
|---|---|---|
headerName
|
string |
|
initialValue
(optional) |
string |
|
activationValue
(optional) |
string |