Bird
0
0

What is the main purpose of an ETag in REST APIs?

easy📝 Conceptual Q11 of 15
Rest API - Caching Strategies

What is the main purpose of an ETag in REST APIs?

ATo help clients check if the resource has changed since last fetch
BTo encrypt the data sent from server to client
CTo authenticate the client making the request
DTo specify the content type of the response
Step-by-Step Solution
Solution:
  1. Step 1: Understand ETag role in REST

    ETags are unique identifiers for resource versions, used to detect changes.
  2. Step 2: Match purpose with options

    Only To help clients check if the resource has changed since last fetch describes checking if resource changed, which is the ETag's purpose.
  3. Final Answer:

    To help clients check if the resource has changed since last fetch -> Option A
  4. Quick Check:

    ETag purpose = freshness check [OK]
Quick Trick: ETags track changes, not encrypt or authenticate [OK]
Common Mistakes:
MISTAKES
  • Confusing ETag with authentication tokens
  • Thinking ETag encrypts data
  • Assuming ETag sets content type

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Rest API Quizzes