Bird
0
0

If a client sends If-Modified-Since: Wed, 10 May 2023 10:00:00 GMT and the resource was last modified at Wed, 10 May 2023 11:00:00 GMT, what will the server respond?

medium📝 Predict Output Q5 of 15
Rest API - Caching Strategies
If a client sends If-Modified-Since: Wed, 10 May 2023 10:00:00 GMT and the resource was last modified at Wed, 10 May 2023 11:00:00 GMT, what will the server respond?
A200 OK with full resource
B304 Not Modified
C403 Forbidden
D204 No Content
Step-by-Step Solution
Solution:
  1. Step 1: Compare resource modification time

    The resource was modified after the date in the If-Modified-Since header.
  2. Step 2: Server response logic

    Since resource is newer, server sends 200 OK with full resource content.
  3. Final Answer:

    200 OK with full resource -> Option A
  4. Quick Check:

    Resource newer than date = 200 with content [OK]
Quick Trick: If resource newer than date, send full content [OK]
Common Mistakes:
MISTAKES
  • Sending 304 when resource is newer
  • Confusing 204 No Content with 304
  • Assuming forbidden status for modification

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes