HTTP has a concept of conditional requests, where the result, and even the success of a request, can be controlled by comparing the affected resources with a validator.
These requests are useful for validating cached content, ensuring that it is only fetched if it differs from the copy that is already available to the browser.
Conditional requests are also useful for ensuring the integrity of a document when resuming a download, or preventing lost updates when uploading or modifying a document on the server....Because a change of content encoding requires a change to an ETag...headers. If the resource has not changed, the server sends back a 304...