---
title: "Answer repeat requests with 304 · Agent Wranglers"
url: https://agentwranglers.se/playbook/website/performance/conditional-requests
updated: 2026-10-20
licence: "All rights reserved"
---

# Answer repeat requests with 304

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

- Level: Recommended
- Chapter: [Performance](https://agentwranglers.se/playbook/website/performance)
- Rule: Send an `ETag` or `Last-Modified` on responses, and answer matching requests with 304 Not Modified.
- How: Make the ETag from a hash of the content. Compare it with `If-None-Match`, and answer 304 with the same caching headers.
- Check: `curl -sI -H 'If-None-Match: <etag>'` returns 304.

Example:

```http
GET /about HTTP/1.1
Host: example.com
If-None-Match: "a1b2c3"

HTTP/1.1 304 Not Modified
ETag: "a1b2c3"
Cache-Control: public, max-age=300
```

**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/conditional-requests`.

- Previous: [Say which request headers change a response](https://agentwranglers.se/playbook/website/performance/vary)
- Next: [Ignore tracking parameters in caches](https://agentwranglers.se/playbook/website/performance/no-vary-search)
- [Performance](https://agentwranglers.se/playbook/website/performance)
