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

# ETag

This response header contains a hash identifying the content in the response body.

Typically, the ETag value is a hash of the underlying data that was rendered, or a hash of the data's last modification time.

ETags can be used to prevent unnecessary re-rendering of unchanged content. See [Conditional requests](https://unpoly.com/learn/conditional-requests.md) for details and examples.

## Format {#format}

A (weak) ETag typically looks like this:

```http
ETag: W/"55e4d42a148795d9f25f89d4"
```

For more information about an ETag's format, see [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag) and [RFC 7232](https://www.rfc-editor.org/rfc/rfc7232#section-2.3).

## Alternatives {#alternatives}

Instead of sending this header, the server may also render fragments with [`[up-etag]`](https://unpoly.com/api/up-etag.md) attributes.

