Practice questions for a team from a web page: the MDN guide to HTTP caching

The MDN page on HTTP caching (CC BY-SA) became twelve practice questions for a web team before a review of its caching headers. Copy the request.

How this was made. Audio and video overviews, slide decks, infographics and quizzes are made with Google's Gemini Notebook (formerly NotebookLM), on accounts that AutoContent operates. AutoContent has no agreement with Google. Google can limit or stop this access at any time.

  1. 1. How does reusing a stored cache response directly reduce the processing load on an origin server?

    1. AIt automatically compresses server memory logs by redirecting traffic to client browsers.
    2. BIt forces the origin server to convert dynamic HTTP requests into static POST operations.
    3. CIt offloads database query parsing directly onto intermediate proxy servers.
    4. DIt eliminates the need for the origin server to parse requests, query databases, or render template engines.

    Hint: Consider the backend operations that an origin server bypasses when it does not need to handle an incoming request.

    Show the answer
    1. A · Not correctResponse reusability reduces incoming request traffic on the server, rather than changing server log management or memory compression.
    2. B · Not correctCaching reuses previously generated responses rather than altering the HTTP methods or backend request handling logic.
    3. C · Not correctIntermediate proxy servers only store and serve HTTP network responses; they do not execute database queries or application backend logic.
    4. D · CorrectWhen a stored response is reusable, the origin server is bypassed completely, saving the compute resources required to parse routing, restore sessions, query databases, or render templates.
  2. 2. What distinguishes a private cache from a shared cache in HTTP caching?

    1. AA private cache is dedicated to a single client to hold personalized content, whereas a shared cache sits between clients and servers to serve multiple users.
    2. BA private cache strictly ignores expiration headers, whereas a shared cache enforces heuristic caching rules exclusively.
    3. CA private cache is managed exclusively by CDNs, while a shared cache operates strictly within a user's web browser.
    4. DA private cache cannot store cookies, while a shared cache requires cookies to differentiate user content.

    Hint: Think about who can access the stored responses in each cache location.

    Show the answer
    1. A · CorrectPrivate caches (such as browser caches) store responses exclusively for one user to prevent information leakage, whereas shared caches (such as proxies and CDNs) store responses shared among multiple users.
    2. B · Not correctBoth private and shared caches observe freshness standards and caching directives.
    3. C · Not correctBrowser caches are private caches tied to individual clients, whereas CDNs are managed shared caches.
    4. D · Not correctPersonalized content in private caches is often controlled by cookies, whereas shared caches must avoid storing personalized cookie-dependent responses to prevent privacy leaks.
  3. 3. Under what condition will a client engage in heuristic caching?

    1. AWhen an HTTP response lacks an explicit Cache-Control header but contains headers indicating past modification history.
    2. BWhen a user performs a forced browser reload using Pragma: no-cache.
    3. CWhen the server sends a Cache-Control: no-store header alongside a past Expires date.
    4. DWhen multiple concurrent requests collapse into a single outgoing origin request.

    Hint: Consider how HTTP behaves when explicit Cache-Control instructions are omitted from a response.

    Show the answer
    1. A · CorrectHTTP is designed to cache as much as possible, so when explicit directives like max-age are missing, clients estimate freshness based on header history (such as Last-Modified).
    2. B · Not correctA force reload intentionally bypasses stored cached responses to obtain an unconditional fresh response from the origin server.
    3. C · Not correctAn explicit no-store directive instructs caches not to store the response under any circumstances.
    4. D · Not correctRequest collapse is an optimization technique used by shared caches to consolidate traffic, independent of heuristic caching.
Show all 12 questions
  1. 4. A shared cache delivers a stored response with Cache-Control: max-age=604800 (1 week) and Age: 86400 (1 day). For how many remaining seconds will the receiving client consider this response fresh?

    1. A86400 seconds
    2. B518400 seconds
    3. C691200 seconds
    4. D604800 seconds

    Hint: Calculate the difference between the total maximum age allowed and the time the response has already spent cached.

    Show the answer
    1. A · Not correctThis value reflects the time elapsed since the response was generated, not the remaining duration of freshness.
    2. B · CorrectThe remaining freshness lifetime is calculated by subtracting the response's Age (86,400 seconds) from its max-age (604,800 seconds), resulting in 518,400 seconds.
    3. C · Not correctThis represents the sum of max-age and Age rather than the difference indicating remaining fresh time.
    4. D · Not correctThis represents the total max-age lifetime from initial generation, ignoring the time already spent stored in the shared cache.
  2. 5. When both an Expires header and a Cache-Control: max-age directive are present in an HTTP response, how do HTTP/1.1-compliant caches handle them?

    1. AThe response is treated as conflicting and immediately marked as stale.
    2. Bmax-age is preferred and overrides the Expires header.
    3. CThe cache falls back to heuristic caching calculation rules.
    4. DExpires takes precedence because explicit timestamps supersede relative time intervals.

    Hint: Recall which directive was introduced in HTTP/1.1 to replace explicit date-time parsing.

    Show the answer
    1. A · Not correctStandard HTTP cache implementations handle the co-existence of both headers smoothly by giving precedence to max-age.
    2. B · CorrectHTTP/1.1 defines max-age to take precedence over Expires because relative time durations avoid clock synchronization issues and date parsing errors.
    3. C · Not correctHeuristic caching occurs only when explicit freshness directives like max-age or Expires are missing.
    4. D · Not correctExpires dates are prone to implementation bugs and system clock drift, so modern HTTP standards prioritize max-age.
  3. 6. What is the primary operational effect of returning a Vary: Accept-Language header in an HTTP response?

    1. AIt forces the client to send a Cache-Control: private directive with every request.
    2. BIt causes the cache to key stored responses using a composite of the response URL and the Accept-Language request header.
    3. CIt prevents shared caches from storing any variation of the requested resource.
    4. DIt automatically translates uncached response bodies into the primary language of the requesting client.

    Hint: Think about how the cache key is constructed when content negotiation request headers are specified.

    Show the answer
    1. A · Not correctVary alters cache keying for content negotiation rather than adding cache-control directives to client requests.
    2. B · CorrectThe Vary header informs caches that content negotiation applies, forcing the cache to separate stored variants based on request header values.
    3. C · Not correctVary allows caches to safely store multiple distinct language variants for a single URL rather than preventing caching.
    4. D · Not correctVary instructs caches how to store variants; translation logic remains entirely with the origin server.
  4. 7. What response does an origin server send when a client validates a stale resource using If-None-Match or If-Modified-Since and the resource has NOT changed?

    1. A204 No Content status code, which invalidates the stale response in the client.
    2. B200 OK status code containing the updated headers and full payload body.
    3. C304 Not Modified status code with no response body.
    4. D412 Precondition Failed status code requiring an unconditional request.

    Hint: Focus on the status code and payload structure when the server confirms the client's cached copy is up to date.

    Show the answer
    1. A · Not correctA 204 status code denotes a successful request with no payload, whereas 304 specifically revalidates stale cached responses.
    2. B · Not correctA 200 OK status with a full body payload is returned only when the resource content has actually changed.
    3. C · CorrectA 304 response signals that the cached representation remains valid, sending only headers to minimize transfer size while revalidating the cached content.
    4. D · Not correctA 412 status code indicates a precondition failure during state-changing or conditional execution, not a cache revalidation match.
  5. 8. How does Cache-Control: no-cache differ from Cache-Control: no-store?

    1. Ano-cache immediately deletes pre-existing stored responses, whereas no-store allows stale historical responses to be reused.
    2. Bno-cache is used exclusively for HTML pages, whereas no-store is required for static subresources.
    3. Cno-cache permits storing the response but forces revalidation before reuse, whereas no-store forbids storing the response anywhere.
    4. Dno-cache prevents storing responses in browser caches, whereas no-store prevents storing responses in shared proxy caches.

    Hint: Differentiate between permission to store content versus permission to reuse content without checking the server.

    Show the answer
    1. A · Not correctno-store prevents new responses from being stored but does not delete already-stored responses, while no-cache requires revalidation before reusing any stored response.
    2. B · Not correctBoth directives can be applied to any HTTP resource depending on privacy and freshness requirements.
    3. C · Correctno-cache forces caches to send a conditional validation request to the server before reusing a stored response, while no-store prevents storing the response in any cache.
    4. D · Not correctBoth directives apply to both private and shared caches; the distinction is storage prohibition versus revalidation requirements.
  6. 9. Which HTTP headers are characteristically included in a request sent by major browsers during a user-initiated force reload?

    1. ACache-Control: private, immutable
    2. BClear-Site-Data: cache and Age: 0
    3. CPragma: no-cache and Cache-Control: no-cache
    4. DCache-Control: max-age=0 and conditional headers like If-None-Match

    Hint: Consider how a browser communicates to the origin server that it wants to bypass all intermediate and browser caches without sending conditional tags.

    Show the answer
    1. A · Not correctimmutable is a response directive sent by servers to prevent revalidation during reloads, not a client request header.
    2. B · Not correctClear-Site-Data is an origin server response header used to clear browser cache storage, not a request header sent by clients.
    3. C · CorrectForce reloads send Cache-Control: no-cache (along with Pragma: no-cache for backward compatibility) without conditional headers like If-None-Match, ensuring an unconditional fetch from the origin.
    4. D · Not correctSending max-age=0 along with conditional headers is characteristic of a standard browser reload, which validates cached content rather than forcing an unconditional fetch.
  7. 10. What limitation exists when an origin server attempts to update or purge a resource that was previously cached in a browser with a long max-age?

    1. AThe origin server loses control of that URL because subsequent requests are served locally by the browser without contacting the server.
    2. BBrowsers automatically purge long max-age resources every 24 hours regardless of specified age directives.
    3. CThe origin server can send an asynchronous DELETE method to automatically clear browser memory caches remotely.
    4. DReturning Cache-Control: no-store on a new response automatically purges older cached entries for that URL.

    Hint: Think about whether requests for cached URLs even reach the server before expiration.

    Show the answer
    1. A · CorrectBecause fresh cached responses are served locally by the browser without reaching the origin server, the server cannot update the client until max-age expires or the user manually clears the cache.
    2. B · Not correctResponses with long max-age directives remain stored and valid in the browser cache until their specified duration expires, unless cleared manually.
    3. C · Not correctStandard HTTP caching specifications do not define a way to explicitly delete or push purges to browser caches remotely once a fresh response is stored.
    4. D · Not correctno-store prevents new responses from being cached, but it does not remove previously stored responses for that same URL.
  8. 11. What occurs during request collapse within a shared cache when multiple identical requests arrive simultaneously?

    1. AThe shared cache automatically converts all incoming requests into conditional requests containing If-Modified-Since.
    2. BThe shared cache transforms the response header into Cache-Control: private to prevent shared storage.
    3. CThe shared cache rejects all concurrent incoming requests with a 429 Too Many Requests status code.
    4. DThe shared cache forwards a single request to the origin server and reuses the resulting response for all waiting clients.

    Hint: Consider what a shared proxy or CDN does when several users request the exact same uncached URL at the exact same instant.

    Show the answer
    1. A · Not correctRequest collapse consolidates incoming requests into a single fetch, regardless of conditional headers.
    2. B · Not correctRequest collapse is a shared cache performance mechanism; applying Cache-Control: private would explicitly prevent sharing.
    3. C · Not correctRequest collapse handles incoming concurrent requests by fulfilling them with a single origin call, rather than rejecting traffic.
    4. D · CorrectRequest collapse optimizes shared cache traffic by consolidating concurrent identical requests into a single request to the origin, sharing the result among all requesting clients.
  9. 12. Which of the following strategies represent recommended best practices for managing static subresources versus main HTML resources?

    More than one answer is correct.

    1. AServe static subresources using cache-busted URLs (containing a version or hash) and long max-age values (such as 1 year).
    2. BApply Cache-Control: no-store liberally across all static subresources to maximize security.
    3. CServe main HTML resources with Cache-Control: public, max-age=31536000 to completely offload origin server traffic.
    4. DServe main HTML resources with Cache-Control: no-cache alongside ETag or Last-Modified headers.

    Hint: Contrast subresources (which can use version/hash strings in their URLs) with main resources (whose URLs cannot easily change).

    Show the answer
    1. A · CorrectSubresources with content hashes or version numbers in their URLs can be safely cached for long periods because updates automatically produce distinct, new URLs.
    2. B · Not correctLiberally applying no-store removes performance benefits, increases server bandwidth, and disables useful platform features like the browser back/forward cache.
    3. C · Not correctCaching main HTML resources for long durations without revalidation prevents clients from receiving page updates released on the origin server.
    4. D · CorrectMain HTML document URLs cannot be easily cache-busted, so requiring revalidation with no-cache ensures clients always fetch the latest content while utilizing lightweight 304 revalidation when unchanged.
AI-generated with AutoContent APIDownload JSON
Questions
12 questions
Credits used
10 credits
Cost on the Starter plan
€0.29
Generation time
2 min 26 s
Format
Quiz
Job
Product docs
Language
English
Generated on
2026-11-04
Make this with the API

This output used 10 credits, which is €0.29 on the Starter plan (€29 per month for 1,000 credits). Failed generations use none. Generation time runs from the request to the finished file; it depends on the sources, the options and the queue.

What came out, and what we would change

We sent the link to the MDN Web Docs page "HTTP caching" (CC BY-SA 2.5) and asked for practice questions for a web development team before a review of its caching headers: one question for each main idea on the page, in the order of the page. The quiz has twelve questions, and one of them has two correct answers.

The questions cover private and shared caches, heuristic caching, freshness and max-age, validation with ETag and Last-Modified, no-cache and no-store, force reloads, and how to delete a stored response. All marked answers are correct, and question 12 marks both correct options.

Question 9 says "major browsers", but the page names three browsers and says that a fourth one sends a different request. Some explanations go beyond the page: question 9 says that Pragma: no-cache is for backward compatibility, and question 7 says that a 200 OK comes only when the content changed, although a force reload also gets one.

A quiz like this works as a short check before a team review: everyone answers first, then the team reads the explanations together and goes back to the page where it disagrees. The quiz on this page is shared under CC BY-SA 2.5, like the MDN page. It took 2 min 26 s to generate and used 10 credits.

More outputs of this kind: AI quiz maker.

The exact request

The body that was sent to POST /content/Create, unchanged, and the same request as curl.

request.json
{
  "resources": [
    {
      "type": "website",
      "content": "https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching"
    }
  ],
  "outputType": "quiz",
  "quizDifficulty": "medium",
  "text": "Practice questions for a web development team before a review of its caching headers: one question for each main idea on this page, in the order of the page. Use only facts that the page states.",
  "language": "English"
}
curl
curl -X POST "https://api.autocontentapi.com/content/Create" \
  -H "Authorization: Bearer $AUTOCONTENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"resources":[{"type":"website","content":"https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Caching"}],"outputType":"quiz","quizDifficulty":"medium","text":"Practice questions for a web development team before a review of its caching headers: one question for each main idea on this page, in the order of the page. Use only facts that the page states.","language":"English"}'
# then poll until "status" is 100:
curl -H "Authorization: Bearer $AUTOCONTENT_API_KEY" "https://api.autocontentapi.com/content/Status/<request_id>"

How we checked it

Questions
We checked every question, its marked answer and each explanation against the source.
Notes
Review notes, against the MDN page: the marked answers in all twelve questions are correct, and question 12 marks both correct options. Question 9 says "major browsers", but the page names three browsers and says that a fourth one sends a different request. Some explanations go beyond the page: question 9 says that Pragma: no-cache is for backward compatibility, and question 7 says that a 200 OK comes only when the content changed.
Checked on
2026-11-04. Failed generations are run again and never published.