HTTP Conditional Requests and Validators

Conditional request headers, comparison rules, and response outcomes for safe caching and lost-update protection.

  • JSON4,838 B
  • YAML3,433 B · −29%
  • TOON2,868 B · −41%

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 it when

  • Avoid downloading unchanged reference files.
  • Prevent an edit from overwriting someone else’s update.

Watch out for

  • A 304 response has no representation body.
  • Validators identify a selected representation, including negotiated variants.

The data

HeaderExamplePurposeCheck
ETagETag: "revision-7"Identify a selected representation.The value is opaque; clients must not construct it.
Last-ModifiedLast-Modified: Mon, 12 Oct 2026 08:00:00 GMTExpose a modification timestamp.Second-level precision may miss rapid edits.
If-None-MatchIf-None-Match: "revision-7"Validate a cached representation.Matching GET or HEAD produces 304; other methods can produce 412.
If-Modified-SinceIf-Modified-Since: Mon, 12 Oct 2026 08:00:00 GMTValidate using a date.If-None-Match takes precedence when both are present.
If-MatchIf-Match: "revision-7"Apply a write only to the expected revision.Use strong entity-tag comparison; mismatch produces 412.
If-Unmodified-SinceIf-Unmodified-Since: Mon, 12 Oct 2026 08:00:00 GMTProtect a write with a timestamp.If-Match takes precedence; timestamps are less precise.
If-RangeIf-Range: "revision-7"Resume a range only if the representation is unchanged.A mismatch sends the whole representation instead.
Weak ETagETag: W/"summary-7"Mark semantic equivalence without byte identity.A weak validator cannot satisfy strong If-Match comparison.

Fields

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.

SectionFieldTypeExample
dataheaderstringETag
dataexamplestringETag: "revision-7"
datapurposestringIdentify a selected representation.
datacheckstringThe value is opaque; clients must not construct…

Fetch the same bytes

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 →

Sources and editorial notes

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.

Topics

  • http-status-codes
  • http conditional requests
  • reference
  • engineering

Search the library

Search by a topic, title, or keyword.

Start with a collection

Browse all 205 datasets