QuestenaPractice that shows what to review next
Question 22

What does a Vary header field listing request field names instruct a cache to do?

  1. Skip caching the response, because it depends on request-specific input
  2. Expand the cache key, so a stored response matches only requests with the same values for the listed fieldsCorrect answer
  3. Store one response per listed field name and merge them when serving
  4. Revalidate the response with the origin server on every subsequent request

Explanation

Vary widens the cache key rather than disabling caching; the response is still stored and reused, but only for requests whose listed fields match the original request. Vary: * is the form that always fails to match, and unconditional revalidation is what no-cache asks for.

Continue with this test

Start practice
Question 22: What does a Vary header field listing request field names… · HTTP Semantics · Questena