January 2019
Beginner
132 pages
3h 14m
English
The Etag is also important in keeping cached information. This is a key unique to this page, and will only change if the content of the page changes. After the cache expires, you can use this tag to check with the server if there is actually new content, without downloading a fresh copy. This works by sending an If-None-Match header containing the Etag value. When this happens, the server will check if the Etag on the current resource matches the Etag in the If-None-Match header. If it does match, then there have been no updates and the server responds with a status code of 304 Not Modified, with some headers to extend your cache. The following is an example of a 304 response:
HTTP/1.1 304 Not ModifiedAccept-Ranges: bytesCache-Control: ...
Read now
Unlock full access