# PrerenderParameters

Artifact: [androidx.webkit:webkit](https://developer.android.com/jetpack/androidx/releases/webkit) [View Source](https://cs.android.com/search?q=file:androidx/webkit/PrerenderParameters.java+class:androidx.webkit.PrerenderParameters) Added in [1.17.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.17.0)

*** ** * ** ***


```
@Profile.ExperimentalUrlPrefetch
public final class PrerenderParameters
```

<br />

*** ** * ** ***

Parameters for customizing the prerender. Use the `https://developer.android.com/reference/androidx/webkit/PrerenderParameters.Builder` to construct.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/webkit/PrerenderParameters.Builder` A builder class to use to construct the `https://developer.android.com/reference/androidx/webkit/PrerenderParameters`. |

| ### Public methods |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/util/Map.html<https://developer.android.com/reference/java/lang/String.html, https://developer.android.com/reference/java/lang/String.html>` | `https://developer.android.com/reference/androidx/webkit/PrerenderParameters#getAdditionalHeaders()()` Returns the map of additional HTTP headers to be sent with the prerender request. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/webkit/NoVarySearchHeader` | `[getExpectedNoVarySearchData](https://developer.android.com/reference/androidx/webkit/PrerenderParameters#getExpectedNoVarySearchData())()` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/webkit/PrerenderParameters#getExpectedNoVarySearchHeader()` instead. <br /> |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/androidx/webkit/NoVarySearchHeader` | `https://developer.android.com/reference/androidx/webkit/PrerenderParameters#getExpectedNoVarySearchHeader()()` Returns the expected No-Vary-Search header data used to match subsequent navigations to this prerender. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Integer.html` | `https://developer.android.com/reference/androidx/webkit/PrerenderParameters#getVariationsId()()` Returns the variations ID associated with this prerender request, if any. |

## Public methods

### getAdditionalHeaders

Added in [1.17.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.17.0)

```
public @NonNull Map<String, String> getAdditionalHeaders()
```

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

### getExpectedNoVarySearchData

Added in [1.17.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.17.0) Deprecated in [1.17.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.17.0)

```
public @Nullable NoVarySearchHeader [getExpectedNoVarySearchData](https://developer.android.com/reference/androidx/webkit/PrerenderParameters#getExpectedNoVarySearchData())()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/webkit/PrerenderParameters#getExpectedNoVarySearchHeader()` instead.

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

### getExpectedNoVarySearchHeader

Added in [1.17.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.17.0)

```
public @Nullable NoVarySearchHeader getExpectedNoVarySearchHeader()
```

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

### getVariationsId

Added in [1.17.0](https://developer.android.com/jetpack/androidx/releases/webkit#1.17.0)

```
public @Nullable Integer getVariationsId()
```

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