From be420ce89fa9afcad1c5aaef52cc3e83c1b7a046 Mon Sep 17 00:00:00 2001 From: apidesigner Date: Wed, 1 Feb 2017 17:18:00 +0000 Subject: [PATCH] Updates protocol/caching.md Auto commit by GitBook Editor --- protocol/caching.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/protocol/caching.md b/protocol/caching.md index ddd10c8..db525fc 100644 --- a/protocol/caching.md +++ b/protocol/caching.md @@ -1,2 +1,16 @@ # Caching Include an ETag header in all responses, identifying the specific version of the returned resource. This allows users to cache resources and use requests with this value in the If-None-Match header to determine if the cache should be updated. + + +ETag +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. +This is how it works: +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. +Further reading +Find below a list of great articles on the topic Caching +https://www.mnot.net/cache_docs/ +http://restcookbook.com/Basics/caching/ +http://odino.org/rest-better-http-cache/ +https://www.subbu.org/blog/2005/01/http-Caching \ No newline at end of file