Bird
0
0

If a client sends an If-None-Match header with a value that does NOT match the current ETag on the server, what will the server typically respond with?

medium📝 Predict Output Q5 of 15
Rest API - Caching Strategies
If a client sends an If-None-Match header with a value that does NOT match the current ETag on the server, what will the server typically respond with?
A304 Not Modified
B200 OK with the resource data
C403 Forbidden
D301 Moved Permanently
Step-by-Step Solution
Solution:
  1. Step 1: Understand non-matching ETag meaning

    If the ETag in If-None-Match does not match, the resource has changed.
  2. Step 2: Identify server response for changed resource

    The server sends the updated resource with status 200 OK.
  3. Final Answer:

    200 OK with the resource data -> Option B
  4. Quick Check:

    Non-matching ETag response = 200 OK with data [OK]
Quick Trick: Non-matching ETag returns 200 OK with data [OK]
Common Mistakes:
MISTAKES
  • Returning 304 when ETags differ
  • Confusing 403 or 301 with caching behavior
  • Assuming no response body on mismatch

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes