Visual RFC.
ALL RFCs / RFC 9110
Read the RFC ↗
RFC 9110 / REQUEST DECISIONS

Validators & conditional requests

06

A validator lets a client ask whether cached content is current or whether an edit would overwrite a newer version.

RFC 9110 · § 13EXAMPLE
4 / 4
04
Protect a newer edit.

A stale condition fails instead of silently overwriting revision 8.

Validators & conditional requestsA client validator revision-7 is compared with current revision-8; If-Match fails and a 412 response prevents a stale edit.Do not overwrite a newer editIllustrative conditional PUTClient copyETag: "revision-7"Current resourceETag: "revision-8"Conditional editIf-Match: "revision-7""revision-7" ≠ "revision-8"412 Precondition Failed · newer edit preservedReject the stale update

Key idea: Attach a precondition before reading or changing state.

Terms
Client / user agent
The app making a request; in this example, your browser.
Origin server
The server responsible for providing an answer for the target resource.
Request
A message asking for an action on a resource.
Response
The server’s message reporting the result of a request.
Resource
Something identified by a URI, such as the page at /story.
Representation
Content and descriptive information that convey a resource’s state, such as an HTML page.
Semantics
What a message or protocol element means, independently of how it travels.
Validator
Information used to compare representation states.
ETag
An opaque tag assigned to a representation; clients compare it rather than interpret its spelling.
Precondition
A condition checked before applying a request’s method.
If-Match
A condition requiring a strong match with a current representation tag.
304 / 412
304 reports no need to transfer content for an applicable conditional read; 412 reports a failed precondition.

Look up a term in the glossary ↗

Rules & examples
  • If-None-Match can revalidate GET or HEAD; an unchanged representation can produce 304.
  • If-Match uses strong comparison and can prevent overwriting a changed representation.
  • Failed preconditions generally produce 412, with evaluation order defined in §13.2.

Weak validators can establish semantic equivalence for some uses; they do not prove byte-for-byte identity for every operation. A 304 has no response content.

Predict: An edit uses If-Match with an old tag. Does the server silently overwrite a newer version?

Check your answer

When the precondition fails, the method is not applied; the response is normally 412 Precondition Failed.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A request starts a conversation.

A client asks for a resource. A server sends a response. The method, address, headers, and status explain what that conversation means.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

EXPLORE THIS PROTOCOL

HTTP versions

HTTP semantics apply across versions. HTTP/2 and HTTP/3 change how messages travel; all three guides remain relevant.

All chapters in RFC 9110

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗