What 304 Not Modified means

304 Not Modified is returned in response to a conditional GET or HEAD when the client's cached representation is still valid. The response has no body; it only confirms that the client's copy can be used.

When a server should return it

  • The request included If-None-Match and the ETag still matches.
  • The request included If-Modified-Since and the resource has not changed since that date.
  • A cache revalidation confirms freshness without a new body.

Example response

http
HTTP/1.1 304 Not Modified
ETag: "8f4e2c1a"
Cache-Control: max-age=3600

Why you might see it unexpectedly

  • A client receiving 304 without having a cached copy — usually a proxy or cache misconfiguration.
  • ETags that change on every request even when content is identical, defeating the cache.
  • Clocks disagreeing on Last-Modified dates, producing false “modified” answers.

Related status codes

200 OK returns the full representation when it has changed. 412 Precondition Failed is the failure case for other conditional headers. Cache-Control and ETag drive the whole mechanism.