Challenge - 5 Problems
Cache-Control Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the effect of this Cache-Control header?
Given the HTTP response header:
What will the browser do with the response?
Cache-Control: no-store
What will the browser do with the response?
Attempts:
2 left
💡 Hint
Think about what 'no-store' means for caching behavior.
✗ Incorrect
The 'no-store' directive tells browsers and caches not to store any part of the response. This means the response is always fetched fresh and never saved.
❓ Predict Output
intermediate2:00remaining
What is the output of this Cache-Control header?
Consider this HTTP response header:
What does this mean for the cached response?
Cache-Control: max-age=3600, must-revalidate
What does this mean for the cached response?
Attempts:
2 left
💡 Hint
Consider how max-age and must-revalidate work together.
✗ Incorrect
max-age=3600 means the response is fresh for 3600 seconds. must-revalidate means after that time, the cache must check with the server before using the cached response.
🔧 Debug
advanced2:00remaining
Identify the error in this Cache-Control header
A developer wrote this Cache-Control header:
What error will this cause?
Cache-Control: max-age=abc, public
What error will this cause?
Attempts:
2 left
💡 Hint
Check the format required for max-age values.
✗ Incorrect
max-age must be a non-negative integer. Using 'abc' is invalid, so the header is ignored or treated as if max-age is not set.
🧠 Conceptual
advanced2:00remaining
Which Cache-Control directive allows shared caches but prevents private caches?
Which Cache-Control directive below allows caching by shared caches (like proxies)?
Attempts:
2 left
💡 Hint
Think about which directive marks a response as cacheable by any cache.
✗ Incorrect
'public' means the response can be cached by any cache, including shared caches. 'private' restricts caching to private caches only.
❓ Predict Output
expert2:00remaining
What is the number of directives in this Cache-Control header?
Count the number of valid directives in this Cache-Control header:
Cache-Control: no-cache, max-age=600, private, must-revalidate, proxy-revalidate
Attempts:
2 left
💡 Hint
Count each directive separated by commas.
✗ Incorrect
The header has five directives: no-cache, max-age=600, private, must-revalidate, and proxy-revalidate.