Gateway Gus saysCaching with ETag and Last-Modified lets clients skip re-downloading unchanged data.
The server tags a response with an ETag (a content fingerprint) or Last-Modified date. Next time, the client sends If-None-Match: <etag>; if nothing changed the server replies 304 Not Modified with no body — saving bandwidth. This conditional request pattern keeps data fresh while avoiding redundant transfers.
Power-ups you unlock
ETag = content fingerprint; Last-Modified = date
Client revalidates with If-None-Match/If-Modified-Since
Unchanged → 304 Not Modified, no body
Saves bandwidth, keeps data fresh
Timeout Titan attacks — common mistakes
No validators → always full re-download
Weak vs strong ETag confusion
Caching responses that should never be cached
Boss battleTrace a conditional GET that results in a 304.
Example code
<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>1 GET /data → 200 + ETag: "v7"
2 GET /data If-None-Match: "v7"
→ 304 Not Modified (no body, use cache)</pre></body></html>