HTTP 304 Not Modified

Matching validator marks identify an unchanged cached copy in front of a server

HTTP 304 Not Modified answers a conditional GET or HEAD. The server tells the client or cache it can use the representation it already has. The 304 supplies applicable metadata and carries no response body.

How a client gets 304

On the first fetch the server can send an ETag. A later request sends that tag in If-None-Match. If the condition indicates that the selected representation is still current, the server can return 304. Modification dates provide another way to revalidate a cached copy.

When a proxy trace shows only the revalidation

Inspect the request that reached the server and look for a conditional header added by the client or cache. If you need to inspect the full representation, run a fresh unconditional GET and check whether an intermediary still revalidates on your behalf. The returned body of a standalone 304 is empty, so it cannot contain an expected-text marker.

Read the request validator beside the response

> GET /assets/handbook.pdf HTTP/1.1
> If-None-Match: "handbook-v7"
< HTTP/1.1 304 Not Modified
< ETag: "handbook-v7"

In this example, the client can continue using its saved copy of version seven. A cache that has that representation can update its stored metadata with applicable response headers. If the origin emits 304 to an intermediary during revalidation, the browser can still receive the cached body in a 200 response when its own request asked for the full representation.

Find why an outdated file is still in use

Confirm that the current origin version has the validator you expect. Compare the requested URI and any representation choices, including language or encoding if the service varies its response on those headers. If the origin returns the same validator for a changed representation, review how the service assigns it. If the origin has the new version and the edge reports the old one, inspect the intermediary’s freshness policy and whether it reached the origin to revalidate.

RFC 9110.

All HTTP status codes · All proxy testing guides · Open the proxy tester