PrefetchParameters


@Profile.ExperimentalUrlPrefetch
class PrefetchParameters


Parameters for customizing the prefetch. Use the Builder to construct.

Summary

Nested types

A builder class for constructing PrefetchParameters instances.

Public functions

(Mutable)Map<String!, String!>

Returns the map of additional HTTP headers to be sent with the prefetch request.

NoVarySearchHeader?

This function is deprecated.

This is just an update in naming, and this method will disappear in a future release.

NoVarySearchHeader?

Returns the expected No-Vary-Search header data used to match subsequent navigations to this prefetch.

Boolean

Returns whether the prefetch request will include client hints.

Int?

Returns the variations ID associated with this prefetch request, if any.

Boolean

This function is deprecated.

This method has been renamed to getShouldSendClientHints and will be removed in a future release.

Public functions

getAdditionalHeaders

Added in 1.17.0
fun getAdditionalHeaders(): (Mutable)Map<String!, String!>

Returns the map of additional HTTP headers to be sent with the prefetch request.

getExpectedNoVarySearchData

Added in 1.17.0
Deprecated in 1.17.0
fun getExpectedNoVarySearchData(): NoVarySearchHeader?

Returns the expected No-Vary-Search header data used to match subsequent navigations to this prefetch.

getExpectedNoVarySearchHeader

Added in 1.17.0
fun getExpectedNoVarySearchHeader(): NoVarySearchHeader?

Returns the expected No-Vary-Search header data used to match subsequent navigations to this prefetch.

getShouldSendClientHints

Added in 1.17.0
fun getShouldSendClientHints(): Boolean

Returns whether the prefetch request will include client hints. See setShouldSendClientHints.

getVariationsId

Added in 1.17.0
fun getVariationsId(): Int?

Returns the variations ID associated with this prefetch request, if any.

isJavaScriptEnabled

Added in 1.17.0
Deprecated in 1.17.0
fun isJavaScriptEnabled(): Boolean

Returns whether JavaScript is enabled for the prefetch, which influences the sending of client hints.