Bird
0
0

Which of the following is the correct syntax to set a Cache-Control header to prevent caching entirely?

easy📝 Syntax Q3 of 15
Rest API - Request and Response Format
Which of the following is the correct syntax to set a Cache-Control header to prevent caching entirely?
ACache-Control: max-age=0
BCache-Control: no-cache
CCache-Control: no-store
DCache-Control: public
Step-by-Step Solution
Solution:
  1. Step 1: Understand cache prevention directives

    'no-store' instructs browsers not to store any cache of the resource.
  2. Step 2: Compare with other options

    'max-age=0' and 'no-cache' allow caching but require validation; 'public' allows caching by any cache.
  3. Final Answer:

    Cache-Control: no-store -> Option C
  4. Quick Check:

    no-store = Prevent caching entirely [OK]
Quick Trick: Use no-store to stop caching completely [OK]
Common Mistakes:
  • Using max-age=0 to prevent caching fully
  • Confusing no-cache with no-store
  • Assuming public disables caching

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes