HTTP Conditional Requests and Validators
Conditional request headers, comparison rules, and response outcomes for safe caching and lost-update protection.
Conditional request headers, comparison rules, and response outcomes for safe caching and lost-update protection.
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.
| 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. |
The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.
| 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… |
The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.
curl "https://yjtoon.com/api/dataset/http-conditional-requests?format=toon"
const res = await fetch( "https://yjtoon.com/static-data/dataset/http-conditional-requests.toon" ); const toon = await res.text();
Rate limit: 120 requests per minute per IP, no key and no signup. API reference →
Original editorial reference notes by YJTOON, informed by the linked primary documentation. External specifications retain their own licenses.
Editorial review: . Source documents keep their own licenses.