1. HTTP (Hypertext Transfer Protocol)

  1. HTTP Status Codes

  1. 304 Not Modified
    1. Writing responses (servers)
    2. Reading responses (clients)
    3. Overview table
    4. Example
    5. See also
    6. History

304 Not Modified

The 304 Not Modified HTTP status code indicates a conditional GET or HEAD did not need to be filled because the conditional request did not require it; and the request would have resulted in a 200 otherwise. This is the expected response if the client's cached copy of a resource is up to date with the server.

Writing responses (servers)

This status code is sent in response to requests with an If-Modified-Since or If-None-Match header, follow rules for those headers for usage. The response must not contain a payload, and additionally may omit the Content-Length header.

The Cache-Control, Content-Location, Date, ETag, Expires, and Vary headers must be the same as in a 200 OK response.

If the client is attempting to perform a nonsafe action, see 412 Precondition Failed instead.

Reading responses (clients)

A 304 Not Modified indicates the client can use the response in the cache the same as if it were returned from the server.

See If-Modified-Since and If-Match for guidence on making these requests.

Overview table

Name
304
Message
304 Not Modified
Description
The client already has an up-to-date copy of the representation.
Specification
RFC 9110: HTTP Semantics §15.4.5. 304 Not Modified

Example

HTTP/1.1 304 Not Modified

See also

History

  1. 1999-06: RFC 2616 §10.3.5. 304 Not Modified
  2. 2014-06: RFC 7231 §4.1. 304 Not Modified
  3. 2022-06: RFC 9110 §15.4.5. 304 Not Modified