api: YAML JSON TOON Database version: 1.0.0 format: json dataset: id: 1002 slug: http-conditional-requests title: HTTP Conditional Requests and Validators description: "Conditional request headers, comparison rules, and response outcomes for safe caching and lost-update protection." summary: "Conditional request headers, comparison rules, and response outcomes for safe caching and lost-update protection. Each row includes a practical application and a failure to check before using it." use_when[2]: Avoid downloading unchanged reference files.,Prevent an edit from overwriting someone else’s update. caveats[2]: A 304 response has no representation body.,"Validators identify a selected representation, including negotiated variants." related[2]: http-cache-directives,http-methods-reference category: HTTP Status Codes category_slug: http-status-codes tags: "http-status-codes,http conditional requests,reference,engineering" view_count: 0 created_at: 1791798640 updated_at: 1791798640 reviewed_at: 2026-10-12 sources[2]{title,url}: IETF HTTP semantics,"https://httpwg.org/specs/rfc9110.html" IETF HTTP caching,"https://httpwg.org/specs/rfc9111.html" reading[1]: http-caching-with-etags-and-cache-control provenance: "Original editorial reference notes by YJTOON, informed by the linked primary documentation. External specifications retain their own licenses." entry_count: 8 fields[4]{section,field,type,example}: data,header,string,ETag data,example,string,"ETag: \"revision-7\"" data,purpose,string,Identify a selected representation. data,check,string,The value is opaque; clients must not construct… data[8]{header,example,purpose,check}: ETag,"ETag: \"revision-7\"",Identify a selected representation.,The value is opaque; clients must not construct it. Last-Modified,"Last-Modified: Mon, 12 Oct 2026 08:00:00 GMT",Expose a modification timestamp.,Second-level precision may miss rapid edits. If-None-Match,"If-None-Match: \"revision-7\"",Validate a cached representation.,Matching GET or HEAD produces 304; other methods can produce 412. If-Modified-Since,"If-Modified-Since: Mon, 12 Oct 2026 08:00:00 GMT",Validate using a date.,If-None-Match takes precedence when both are present. If-Match,"If-Match: \"revision-7\"",Apply a write only to the expected revision.,Use strong entity-tag comparison; mismatch produces 412. If-Unmodified-Since,"If-Unmodified-Since: Mon, 12 Oct 2026 08:00:00 GMT",Protect a write with a timestamp.,If-Match takes precedence; timestamps are less precise. If-Range,"If-Range: \"revision-7\"",Resume a range only if the representation is unchanged.,A mismatch sends the whole representation instead. Weak ETag,"ETag: W/\"summary-7\"",Mark semantic equivalence without byte identity.,A weak validator cannot satisfy strong If-Match comparison.