freecoding.school100% FREE · NO SIGNUP
Gateway RidgeISSUE #5 of 35

caching · etag · last-modified

Gateway GusVSTimeout Titan
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

Timeout Titan attacks — common mistakes

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>
▶ Open the interactive comic issue
‹ Idempotency Keys · Safe RetriesCaching · Vary · Cache-Control · Expires ›