The answer to a conditional GET whose If-None-Match matched the current ETag: your cached copy is still valid, so no body is sent.
Defined in RFC 9110 §15.4.5 — 304 Not Modified · MDN reference
Every well-cached asset and API response with a validator. It is the code behind most of the bandwidth a busy site does not spend.
The cheapest performance win most clients never claim. Test that you store the ETag, send it back, and treat the empty 304 body as a cache hit rather than an error.
A 304 has no body, and that is the point — serve the cached copy. Send back exactly the validator you were given: the ETag in If-None-Match, or the Last-Modified date in If-Modified-Since. Do not synthesise a validator, and do not strip the quotes or weak-prefix off an ETag.
3 endpoints in this playground answer with 304. Every one is free, needs no signup, and can be called from the browser or with curl.
GET https://funapi.dev/api/football/v1/standings — Not Modified — If-None-Match matched the current etag (Football API) Open & run this endpointGET https://funapi.dev/api/bank/v1/exchange-rates — On the live API: repeat with If-None-Match: "rates-v1" (Bank API) Open & run this endpointGET https://funapi.dev/api/fiba/v1/groups/{letter}/standings — Not Modified — If-None-Match matched (FIBA World Cup API) Open & run this endpointAll HTTP status codes · All 39 mock REST APIs · Getting started guide
Last updated