CS Fundamentals Trainer · JavaScript · Performance & Memory

An HTML document is served with Cache-Control: no-cache and an ETag. What does the browser do on the next visit?

An HTML document is served with `Cache-Control: no-cache` and an `ETag`. What does the browser do on the next visit?

  1. It doesn't store the response, so the document is downloaded in full on each visit.
  2. It reuses the stored copy without contacting the server until the ETag expires.
  3. It stores the response but revalidates with `If-None-Match` before each reuse, and a `304` lets it reuse the stored copy.
  4. It reuses the stored copy for the rest of the session and revalidates after the tab is closed.

Difficulty: hard

Answer this question

Related questions