What does Cache-Control: max-age specify for the HTML response?

Study for the AEM DevOps Engineer Test. Dive into flashcards and multiple choice questions, each featuring hints and explanations. Prepare to ace your exam!

Multiple Choice

What does Cache-Control: max-age specify for the HTML response?

Explanation:
Cache-Control: max-age defines how long caches should keep a response before considering it stale. It sets the freshness lifetime in seconds. For an HTML response, max-age tells browsers and intermediate caches how long they can serve the cached page without re-fetching it from the server. For example, max-age=3600 means the HTML can be served from cache for one hour. After that window, the cache may revalidate or fetch a fresh copy. This does not mean the resource is never cached or that it’s cached indefinitely—those would require different values or directives. It also doesn’t mandate revalidation every hour; revalidation occurs only after the specified freshness period has expired.

Cache-Control: max-age defines how long caches should keep a response before considering it stale. It sets the freshness lifetime in seconds. For an HTML response, max-age tells browsers and intermediate caches how long they can serve the cached page without re-fetching it from the server. For example, max-age=3600 means the HTML can be served from cache for one hour. After that window, the cache may revalidate or fetch a fresh copy.

This does not mean the resource is never cached or that it’s cached indefinitely—those would require different values or directives. It also doesn’t mandate revalidation every hour; revalidation occurs only after the specified freshness period has expired.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy