Why Does an HTTP 304 Response Have No Body?
A 304 response has no body because the client already holds the selected representation; the status confirms that the stored body is still valid and refreshes its metadata.
The short answer
A 304 response to a conditional GET or HEAD means the condition evaluated to false: the representation the client already stored is still current. The response therefore carries no content. RFC 9110 describes 304 as a response terminated by the first empty line after the header section, because it cannot contain content or trailers. The body comes from the client's cache or stored copy, not from the 304 message itself.
A 304 is not a small copy of the resource and it is not a redirect. It is a metadata update. The server repeats or refreshes header fields that would have appeared in a 200 response, such as ETag, Date, Cache-Control, Expires, and Vary, and the recipient combines those fields with the stored representation.
A minimal example
The first request stores the representation and its validator. The second request asks the origin to confirm it.
GET /report.pdf HTTP/1.1
Host: example.com
HTTP/1.1 200 OK
ETag: "v17"
Cache-Control: max-age=600
Content-Length: 48213
<48213 bytes of the report>
GET /report.pdf HTTP/1.1
Host: example.com
If-None-Match: "v17"
HTTP/1.1 304 Not Modified
ETag: "v17"
Cache-Control: max-age=600
Date: Sat, 29 Nov 2026 10:00:00 GMT
The second response ends at the blank line. A client that reads past it is reading the next response on a persistent connection, not a body belonging to the 304. With curl, curl -i -H 'If-None-Match: "v17"' https://example.com/report.pdf prints the 304 headers and no content; the stored file is what makes the result useful.
Why this happens
The conditional request tells the server which version the client has. If it still matches, resending the bytes would waste bandwidth and latency. The 304 is the smallest message that confirms reuse. This is also why cache validation depends on it: a stale cache entry can send a conditional request, and a 304 refreshes the entry's freshness lifetime without transferring the representation again.
The behavior explains why validators matter. Without an ETag or Last-Modified value, the client cannot make a conditional request, and the server has no reason to answer 304. Strong and Weak ETag Comparison explains how the validator is compared for this case.
What changes the answer
| Status | Body |
|---|---|
200 |
The new representation |
304 |
None; stored bytes are reused |
A 304 can only follow a request that carried If-None-Match or If-Modified-Since; a server that returns 304 to an unconditional request is misbehaving, and a client should treat the stored body as unverified. If both conditional fields are present, If-None-Match takes precedence and If-Modified-Since is ignored.
The response also depends on the method. 304 is defined for GET and HEAD, and a 304 to HEAD still has no body by the method's own rules. For a 304, Content-Length, if present, describes the size of the selected representation in a hypothetical 200 response, not bytes in this message. Clients must not wait for that many bytes.
Edge cases
A cache receiving a 304 must update the stored headers with the new ones and recalculate freshness; it must not create a second copy. If a 304 arrives for a request that had no stored response, there is nothing to reuse and the result is effectively an error. Shared caches must also honor Cache-Control directives refreshed by the 304; see Freshness and Validation in Cache-Control.
Servers sometimes add Content-Length or Transfer-Encoding to a 304. Content-Length is legal and informational. Transfer-Encoding has no content to describe and should not be sent. Intermediaries must not add a body to a response that is defined to have none.
Practical checks
Use a headers-only request and inspect the framing.
curl -sS -D - -o /dev/null \
-H 'If-None-Match: "v17"' \
https://example.com/report.pdf
A correct result is HTTP/1.1 304 Not Modified with headers and zero bytes written. To confirm the validator itself, use the procedure in Validate an ETag with curl. A 200 means the stored representation no longer matches; a 304 with a missing or corrupt stored body means discard it and request the resource unconditionally.
Sources
Revision history
- Published
- Updated
- — Initial publication.