---
name: "X-Up-Version"
area: "API"
kind: "HTTP header"
parent: "up.protocol module"
url: "https://unpoly.com/api/X-Up-Version"
---
<nav aria-label="Unpoly docs">[All docs](https://unpoly.com/index.md) · [up.protocol module](https://unpoly.com/api/up.protocol.md)</nav>

# X-Up-Version

This request header contains the current Unpoly version to mark this request as a fragment update.

Server-side code may check for the presence of an `X-Up-Version` header to distinguish [fragment updates](https://unpoly.com/api/up.link.md) from full page loads.

The `X-Up-Version` header is guaranteed to be set for all [requests made through Unpoly](https://unpoly.com/api/up.request.md).

## Example {#example}

The user updates a fragment. Unpoly automatically includes the following request header:

```http
X-Up-Version: 1.0.0
```

The server chooses to render different HTML for Unpoly requests, e.g. by excluding the document `<head>` and only rendering the `<body>`. The server responds with the following HTTP:

```http
Vary: X-Up-Version

<body>
  ...
</body>
```

> #### Note
>
> Request headers that influenced a response should be listed in a [`Vary`](https://unpoly.com/api/Vary.md) response header. This tells Unpoly to [partition its cache](https://unpoly.com/learn/optimizing-responses.md#vary) for that URL so that each request header value gets separate cache entries.

