Cache Control and ETags

Top  Previous  Next

A GET request on a resource will typically return a set of cache control headers. These include:

 

ETag: a unique identifier for the returned version of the resource
LastModified: the date/time when the resource was last modified.

 

These properties can then be used in subsequent calls to perform a conditional GET on the resource. By either:

 

Specifying the last retrieved ETag value for the resource in an If-None-Match request header or
Specifying the last retrieved LastModified value for the resource in an If-Modified-Since header

 

If the resource has not been modified, the server response will be a 304 Not Modified.