Skip to main content
InterviewHubPRO
Section Overview
Q20

Question 20 of 50

Part 2: Core Architecture & Implementation (Mid-Level)

40%
Networking & Protocols (50 Qs)•Part 2: Core Architecture & Implementation (Mid-Level)

What are HTTP Caching Headers (`Cache-Control`, `ETag`, `Last-Modified`)?

senior LevelMost AskedSystem DesignHTTP & REST APIs

In Simple Words:

  • Cache-Control: max-age=3600, public: Browser and CDNs cache the response for 1 hour without checking the server.
  • Cache-Control: no-cache: Browser caches the response, but must revalidate with the origin server via ETag before using it!
  • Cache-Control: no-store: Never cache anything (banking, sensitive data).
  • ETag: A cryptographic hash of the content. Browser sends If-None-Match: "hash". If unchanged, server responds with 304 Not Modified (zero body bytes!).