A static website is hosted in S3 and delivered through CloudFront using the Managed-CachingDisabled cache policy. Developers frequently update a particular S3 object, and users see the correct content on first load, but a browser refresh does not retrieve the updated object. What change should a SysOps administrator recommend to ensure refreshed pages fetch the latest file?
Choose an answer
Tap an option to check your answer.
Correct answer: Add a Cache-Control header to the S3 object with max-age=0..
Why this is the answer
The correct solution is to add a Cache-Control header with max-age=0 to the S3 object. This header instructs browsers and intermediate caches (like CloudFront's edge locations, even with CachingDisabled) to revalidate the content with the origin server before serving it. When a user refreshes their browser, the browser will send a conditional request to CloudFront, which will then check S3 for the latest version, ensuring the updated file is fetched. Switching to Managed-CachingOptimized would likely worsen the problem, as it prioritizes caching for performance, potentially serving stale content for longer. Disabling S3 versioning is irrelevant to browser caching behavior. Enabling content compression optimizes transfer size but does not affect content freshness.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed