304 Not Modified answers a conditional request by saying the client's cached copy is still valid, so no body is sent. The client states which version it holds via If-None-Match (ETag-based) or If-Modified-Since (time-based).
If the resource is unchanged, the server returns a short headers-only 304 and the client reuses its local cache. This is the heart of revalidation caching and greatly cuts bandwidth and latency.
GET /styles/main.css HTTP/1.1
Host: example.com
If-None-Match: "a1b2c3"
If-Modified-Since: Wed, 15 Jul 2026 10:00:00 GMTHTTP/1.1 304 Not Modified
ETag: "a1b2c3"
Cache-Control: max-age=3600
Date: Wed, 16 Jul 2026 09:00:00 GMT// Express sets ETag automatically and returns 304 when
// the incoming If-None-Match matches:
app.get('/data', (req, res) => res.json(payload));curl -i -H 'If-None-Match: "a1b2c3"' https://example.com/styles/main.css
# -> HTTP/1.1 304 Not Modified (no body sent)