Bird
0
0

You want to optimize your API to reduce bandwidth by sending full content only when it changes. Which combination of headers should you use?

hard📝 Application Q8 of 15
Rest API - Request and Response Format
You want to optimize your API to reduce bandwidth by sending full content only when it changes. Which combination of headers should you use?
ACache-Control: max-age=0, must-revalidate and ETag
BCache-Control: no-store and ETag
CCache-Control: public and no ETag
DCache-Control: max-age=3600 and no ETag
Step-by-Step Solution
Solution:
  1. Step 1: Identify headers for bandwidth optimization

    ETag allows the server to tell if content changed; max-age=0 with must-revalidate forces validation.
  2. Step 2: Evaluate options

    Cache-Control: max-age=0, must-revalidate and ETag combines revalidation with ETag, so full content is sent only if changed.
  3. Step 3: Exclude other options

    no-store disables caching, public without ETag can't validate changes, max-age without ETag sends full content always.
  4. Final Answer:

    Cache-Control: max-age=0, must-revalidate and ETag -> Option A
  5. Quick Check:

    max-age=0 + must-revalidate + ETag = bandwidth saved [OK]
Quick Trick: Use must-revalidate with ETag to send content only if changed [OK]
Common Mistakes:
MISTAKES
  • Using no-store disables caching, wasting bandwidth
  • Missing ETag disables change detection
  • Relying on max-age alone sends full content always

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes