API Design · Middle · Question 20 of 75
What does 304 Not Modified save?
- 1Server CPU in every case
- 2Database writes
- ✓Correct answer: Bandwidth: the server confirms the client's cached version (matched by
If-None-MatchorIf-Modified-Since) is still current and sends no body
Explanation
Generating the ETag may still require loading data; cheap ETags (version numbers, update timestamps) make it worthwhile.