Web Technology Basics

The response for a "my page" whose content differs for each user is given Cache-Control: private, max-age=60. Which of the following correctly describes the effect of this setting?

  1. AOnly shared caches such as a CDN reuse it for 60 seconds, and the user's browser cache does not store it
  2. BThe browser cache can reuse it as is for 60 seconds, but shared caches such as a CDN or a proxy do not store it
  3. CIt is not stored in any cache, so even the browser fetches it from the server again every time
Show answer and explanation

Answer: B. The browser cache can reuse it as is for 60 seconds, but shared caches such as a CDN or a proxy do not store it

A browser cache is used by a single user only, whereas the caches of a CDN or a proxy are shared by many users. private indicates that the response must not be stored in shared caches, and max-age=60 indicates that for 60 seconds after storing, it may be used without checking with the server. If per-user pages were stored in a CDN, it could lead to accidents in which other users are shown someone else's information. To have a response stored nowhere, no-store is used, and to allow storing but require a check with the server on each use, no-cache is used.

  • A. private prevents storage in shared caches; it is the user's browser cache that can store it.
  • B. Correct. The browser can use it for 60 seconds without checking with the server, but shared caches do not store it.
  • C. The setting that prevents storage anywhere is no-store. With private, the response is stored in the browser cache.
Practice this topic Back to topic

Books on Web Technology Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Web Technology Basics questions

  1. When a web server compresses responses with gzip or Brotli before sending them, which of the following generally gains the least reduction in transferred data from compression?
  2. 1.5 MB of text data is compressed with gzip to one third of its size and sent. The bandwidth is 10 Mbps and the RTT is 100 ms, and before the data starts to be sent, the TCP connection, the TLS handshake and the HTTP request take three round trips in total. Assume 1 MB = 10^6 bytes, and ignore compression and decompression time, headers and waiting caused by TCP congestion control. Which of the following is closest to the time until all the data has been received?
  3. A CDN receives 2,000 requests per second, and its cache hit ratio rises from 90% to 98%. The response time is 20 ms on a hit, and 200 ms on a miss because the content is fetched from the origin server and returned; only requests that miss reach the origin server. Which of the following is the combination of the number of requests reaching the origin server and the average response time after the ratio reaches 98%?
  4. Among Core Web Vitals, the metrics of a web page's user experience, which of the following does CLS (Cumulative Layout Shift) represent?
  5. Which of the following is an appropriate pairing of an image format for web pages with its typical use?