Why is status code 304 considered a "redirect?"

I'm currently trying to figure out how exactly 304 / Not modified matches the 3xx HTTP status class. RFC 1945 sec 9.3 and RFC 2616, sec. 10.3 both read:

This class of status code indicates that the user agent must take additional steps to complete the request.

While “downloading from the client’s local cache” is clearly a “next step”, I am struggling to understand how this redirection is in the sense of HTTP. Am I reading it too literally?

+5
source share
2 answers

See http://greenbytes.de/tech/webdav/draft-ietf-httpbis-p2-semantics-26.html#rfc.section.6.4.p.2 :

There are several types of redirects:

  • Redirects indicating that the resource can be accessed in another URI, as provided for by the "Place" field, as in status codes 301 ("Moved permanently"), 302 (Found) and 307 (Temporary redirect).

  • A redirection that offers a selection of suitable resources, each of which is capable of representing the original purpose of the request, as in status code 300 (multiple selection).

  • Redirecting to another resource identified by the "Place" field, which can represent an indirect response to the request, as in status code 303 (see the "Other" section).

  • Redirecting to a previously cached result, as well as to the status code 304 (not changed).

+7
source share

I assume that this is because the server “redirects” the client to download the requested resource from its local cache, rather than downloading it from the server. If the client did not have a local cached copy, then it should not send a conditional request in the first place.

+2
source share

All Articles