PrefetchParameters


@Profile.ExperimentalUrlPrefetch
public final class PrefetchParameters


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

Summary

Nested types

public final class PrefetchParameters.Builder

A builder class for constructing PrefetchParameters instances.

Public methods

@NonNull Map<StringString>

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

@Nullable NoVarySearchHeader

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

@Nullable Integer

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

boolean

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

Public methods

getAdditionalHeaders

public @NonNull Map<StringStringgetAdditionalHeaders()

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

getExpectedNoVarySearchData

public @Nullable NoVarySearchHeader getExpectedNoVarySearchData()

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

getVariationsId

public @Nullable Integer getVariationsId()

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

isJavaScriptEnabled

public boolean isJavaScriptEnabled()

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