Bird
0
0

Why does the HTTP specification require that a 304 Not Modified response must not contain a message body?

hard📝 Conceptual Q10 of 15
Rest API - Caching Strategies
Why does the HTTP specification require that a 304 Not Modified response must not contain a message body?
ATo force clients to always reload the resource
BBecause 304 responses are only for error reporting
CBecause 304 responses must include a Location header instead
DTo prevent unnecessary data transfer when resource is unchanged
Step-by-Step Solution
Solution:
  1. Step 1: Understand the purpose of 304 status

    304 means resource is unchanged; client should use cached copy.
  2. Step 2: Reason about message body necessity

    Sending a body wastes bandwidth since client already has the data.
  3. Final Answer:

    To prevent unnecessary data transfer when resource is unchanged -> Option D
  4. Quick Check:

    304 no body avoids redundant data transfer [OK]
Quick Trick: 304 no body saves bandwidth by avoiding duplicate data [OK]
Common Mistakes:
MISTAKES
  • Thinking 304 is an error status
  • Believing 304 forces reload
  • Confusing 304 with redirects

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes