Skip to the content
searchboar.

Crawling and indexing

HTTP 304: Meaning, examples and limitations

HTTP 304 Not Modified tells a client making a conditional request that its stored representation can be reused. The server sends validation information instead of sending the resource body again.

At a glance

  • 304 is a cache-validation response, not a missing-page error.
  • It follows a conditional request, commonly using a saved validator.
  • Reuse still depends on correct cache rules and resource versions.
On this page
A stored page exchanges a matching version token with a server.
HTTP 304 Not Modified tells a client making a conditional request that its stored representation can be reused.

Why ask for something already stored?

A browser may hold a copy of a page or asset but need to check whether it is still current. It can send a conditional request using a validator, such as an ETag with If-None-Match. When the applicable condition indicates no change, a 304 lets it reuse the stored body. HTTP reference

This differs from a fresh cached response that can be reused without contacting the server. A 304 normally still involves a network exchange, even though it avoids downloading the complete body again.

Example: an unchanged reference page

Imagine a browser revisiting a glossary page whose cached version needs validation. If the page has not changed according to the server's validator, the server can return 304 and the browser displays its saved copy. If the definition has changed, the server should provide the new representation instead.

The example depends on the cache configuration. It is not a claim that every website, browser visit or crawler request receives a 304. Cache-Control establishes reuse conditions; a validator identifies a particular representation.

What can go wrong?

An incorrect validator or a cache key that mixes different versions can cause stale or wrong content to be reused. For example, two languages must not accidentally share a validator and stored response as if their bodies were identical. Personalized responses need appropriate private-cache handling rather than indiscriminate shared reuse.

Inspect the request headers, response headers and stored version together. Looking only for a 200 status misses the purpose of conditional requests: a successful revalidation can legitimately use 304 without a new body.

How does it relate to performance?

Avoiding a repeated body transfer can save bandwidth, but validation still has latency and processing costs. It is not equivalent to eliminating all requests or guaranteeing a smaller bill. Compare real traffic and response timing, and check that meaningful content changes become visible after cache invalidation or revalidation.

Sources

  1. MDN: HTTP 304