HTTP status and headers as one connected flow
Summary
Alan Dean's diagram arranges HTTP requests, responses, status codes and redirects into a compact flow model. HTTP response codes consist of three digits. The first digit denotes the broad class of result.
Ideas
- A request carries the method, target, protocol version and headers.
- Response codes group information, success, redirection, client errors and server errors.
- Location links redirect responses to a new target.
- Cache headers control reuse and conditional follow-up requests.
- Content-Type describes the representation of the transferred payload.
- Connection headers influence the reuse of the transport channel.
Insights
- A protocol diagram shows relationships that individual header descriptions hide.
- Status codes describe protocol results, not automatically business success.
- Caching is a dialogue between client, intermediaries and the origin system.
- Correct metadata prevents unnecessary transfers and misinterpretations.
Facts
- 304 transfers no new representation when the cache is valid.
- 301 and 302 point to other resources via Location.
Recommendations
- Look at the complete headers when dealing with redirect and cache problems.
- Choose status codes by protocol semantics rather than convenience.
- Test proxies and browsers with the same conditional requests.
References
Links to the original source and the Web Archive open in a new tab.