---
title: "Say which request headers change a · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/performance/vary
updated: 2026-10-20
licence: "All rights reserved"
---

# Say which request headers change a response

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [Performance](https://agentwranglers.se/playbook/website/performance)
- Rule: Send `Vary` with every request header that changes a response, such as `Accept-Encoding` and `Accept`.
- How: Send `Vary: Accept-Encoding` on compressed responses. Add `Accept` wherever the same address can return different formats. An address that always returns one format needs no `Vary: Accept`.
- Check: `curl -sI -H 'Accept-Encoding: br'` on a compressed response shows `Vary` with `Accept-Encoding`. On an address that answers `Accept: text/markdown` with Markdown, both answers show `Vary` with `Accept`.

Example:

```http
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Encoding: br
Vary: Accept-Encoding, Accept
```

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/performance/vary`.

- Previous: [Cache files for a year and pages briefly](https://agentwranglers.se/playbook/website/performance/cache-control)
- Next: [Answer repeat requests with 304](https://agentwranglers.se/playbook/website/performance/conditional-requests)
- [Performance](https://agentwranglers.se/playbook/website/performance)
