Quick Answer
Conditional requests reduce bandwidth. Server sends ETag (hash of content) and Last-Modified in responses. Client caches and sends If-None-Match/If-Modified-Since on next request. Server compares: if unchanged, return 304 Not Modified (no body). Implement in middleware or action filters. Useful for read-heavy endpoints where data changes infrequently. Reduces server load and network traffic for unchanged resources.
Answer
Use:
ETag
Last-Modified
If-None-Match or If-Modified-Since
Returns 304 Not Modified when content is unchanged.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.