Fundamentals · Hard · Free
Explain Cache-Control, ETag, and conditional GET.
FresherFundamentalsComputer Networks
HTTP caching
- Cache-Control: max-age, no-store for sensitive data.
- ETag: server fingerprint of representation.
- Conditional GET: If-None-Match → 304 saves bandwidth.
text
GET /api/profile
If-None-Match: "abc123"
→ 304 Not Modified (use local cache)CDN caches respect Cache-Control—stale HTML is a common bug.