Bird
0
0

Given the header Cache-Control: public, max-age=600, what will happen when a browser receives this response?

medium📝 Predict Output Q13 of 15
Rest API - Caching Strategies
Given the header Cache-Control: public, max-age=600, what will happen when a browser receives this response?
AThe response will be cached privately for 10 minutes
BThe response will not be cached at all
CThe response will be cached and shared by any user for 10 minutes
DThe response will be cached but must be revalidated every time
Step-by-Step Solution
Solution:
  1. Step 1: Understand the public directive

    public means the response can be cached by any cache, including shared caches.
  2. Step 2: Interpret max-age=600

    This means the cached response is fresh for 600 seconds (10 minutes) without revalidation.
  3. Final Answer:

    The response will be cached and shared by any user for 10 minutes -> Option C
  4. Quick Check:

    public + max-age=600 means shared cache for 10 minutes [OK]
Quick Trick: Public means shared cache; max-age sets cache time [OK]
Common Mistakes:
MISTAKES
  • Thinking public means private caching
  • Confusing max-age with no-cache
  • Assuming revalidation is always required

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes