Updates protocol/caching.md

Auto commit by GitBook Editor
This commit is contained in:
apidesigner
2017-02-02 15:16:40 +00:00
parent 892563e6cb
commit 0b71f9e9e6

View File

@@ -6,4 +6,4 @@ Every API client SHOULD use [`If-None-Match` HTTP header](https://tools.ietf.org
#### How ETag works
ETags are unique identifiers for a specific version of a resource found by a URL. They are used for cache validation, to quickly check for modifications.
A client requests a resource from the serve at a specific URI. The server responds with the specific ETag value in the HTTP ETag header field. This and the resource will be stored locally by the client. Subsequent requests from the client are done with the If-None-Match header, which now contains the ETag value from the previous request. The server now compares the values. If they are the same, it responds with HTTP Status Code 304. If not, the resource is sent.
A client requests a resource from the serve at a specific URI. The server responds with the specific ETag value in the HTTP ETag header field. This and the resource will be stored locally by the client. Subsequent requests from the client are done with the If-None-Match header, which now contains the ETag value from the previous request. The server now compares the values. If they are the same, it responds with HTTP Status Code **304 Not Modified**. If not, the resource is sent.