Skip to the content

304 Not Modified

The copy the client already has is still up to date, so the server sends no body. This is how caching saves time and data.

Class
3xx Redirection. The client has to take another step to finish the request, usually fetching a different address.
Defined in
RFC 9110

What it looks like

HTTP/1.1 304 Not Modified
ETag: "5f3a-61c"
Cache-Control: max-age=3600

Share this tool:TwitterFacebookLinkedInWhatsAppEmail

When a server sends it

In answer to a conditional request. The browser has the file in its cache and asks whether it changed, by sending the ETag it got before in If-None-Match, or the date in If-Modified-Since. If nothing changed, the server answers 304 with headers only.

What to do with it

Nothing: the browser shows its cached copy. If you see stale content, the fault is in what the server compares, not in the 304. A file that changed has to get a new ETag or Last-Modified date. A forced reload in the browser skips the cache and gets a 200.

In your own code a 304 can only come back when you sent a conditional header yourself, and then you have to use the copy you kept.

Not to be confused with

200 OKThe full response, sent when the file changed or the request had no condition.
412 Precondition FailedThe other outcome of a condition, used when a change must not go ahead.

How Google treats it

For Google a 304 means that the content is the same as at the last crawl. It has no effect on indexing.

All codes are on the list of HTTP status codes, which can be searched by number and by word.

See all 12