Redirection · 3xx

304 Not Modified

The cached version of the resource is still valid; no body is sent.

What 304 Not Modified means

304 Not Modified is the cornerstone of HTTP conditional caching. The client sends a request with If-None-Match: "etag-value" or If-Modified-Since: <date>; if the resource has not changed, the server responds with 304 and an empty body. The client uses its cached copy. This saves bandwidth and latency on repeat requests for unchanged resources, especially images, CSS, JS, and API data that does not change between requests.

When servers should return it: Return 304 when a conditional request indicates the cached version matches the current resource. Always include the ETag (or Last-Modified) header so the client can re-validate later.

Example response

curl -i -H 'If-None-Match: "abc123"' https://example.com/style.css

HTTP/2 304
etag: "abc123"
cache-control: public, max-age=3600

Related status codes

Frequently Asked Questions

Can 304 have a body?
No. 304 must have an empty body. Headers are allowed and encouraged (ETag, Cache-Control).
Difference between ETag and Last-Modified?
ETag is an opaque identifier (often a hash); Last-Modified is a timestamp. ETag is more reliable because timestamps have one-second resolution and clock-skew issues. Use ETag if you can.
Is 304 fast?
Yes. The server checks ETag/Last-Modified without generating the full response. CDNs handle 304 at the edge, often without ever hitting the origin.
Defined in: RFC 9110 · Class: 3xx Redirection

More references

For a one-page reference of all HTTP status codes, see the HTTP cheat sheet. For testing API responses, try the API Tester tool. For inspecting responses on the command line, the curl cheat sheet covers the most common flags.