Bird
0
0

What is the main purpose of the Last-Modified header in a REST API response?

easy📝 Conceptual Q11 of 15
Rest API - Caching Strategies
What is the main purpose of the Last-Modified header in a REST API response?
ATo tell the client when the resource was last changed
BTo tell the client the size of the resource
CTo tell the client the type of the resource
DTo tell the client the server's current time
Step-by-Step Solution
Solution:
  1. Step 1: Understand the role of Last-Modified header

    The Last-Modified header indicates the date and time when the resource was last changed on the server.
  2. Step 2: Compare options with the header's purpose

    Only To tell the client when the resource was last changed correctly describes this purpose. Other options describe unrelated information.
  3. Final Answer:

    To tell the client when the resource was last changed -> Option A
  4. Quick Check:

    Last-Modified = resource last change time [OK]
Quick Trick: Last-Modified shows last change date of resource [OK]
Common Mistakes:
MISTAKES
  • Confusing Last-Modified with Content-Length
  • Thinking it shows server current time
  • Mixing it up with Content-Type header

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes