Recall & Review
beginner
What is the purpose of the Cache-Control header in HTTP?
The Cache-Control header tells browsers and other clients how to store and reuse responses to improve speed and reduce server load.
Click to reveal answer
beginner
What does the directive
no-cache mean in Cache-Control?no-cache means the client must check with the server before using a cached response to make sure it is still fresh.Click to reveal answer
intermediate
Explain the difference between
no-store and no-cache directives.no-store means do not save the response anywhere, while no-cache means save it but always check with the server before reuse.Click to reveal answer
beginner
What does the
max-age directive specify?max-age sets the maximum time in seconds that a response can be used from cache without checking the server.Click to reveal answer
beginner
How does the
public directive affect caching?public means the response can be cached by any cache, even shared ones like proxies.Click to reveal answer
Which Cache-Control directive forces the client to always validate the cached response with the server before using it?
✗ Incorrect
no-cache requires validation before reuse.What does
max-age=0 mean in Cache-Control?✗ Incorrect
max-age=0 means the cached response is stale immediately and must be checked with the server.Which directive prevents storing the response in any cache?
✗ Incorrect
no-store forbids storing the response anywhere.If a response has
Cache-Control: private, who can cache it?✗ Incorrect
private means only the end user's browser can cache the response.What does the
must-revalidate directive enforce?✗ Incorrect
must-revalidate means once the cached response is stale, it must be checked with the server before reuse.Describe the main Cache-Control directives and their effects on caching behavior.
Think about how each directive controls storing, reusing, or validating cached responses.
You got /6 concepts.
Explain how Cache-Control headers help improve web performance and user experience.
Consider what happens when browsers reuse cached data correctly.
You got /4 concepts.