Conditional GET

A conditional GET is a way for the client to tell the server that it already has a version of this document cached, but the server should re-send the document if it has changed since the cached version was created. If the document has changed, the server should send a 200 OK response with the full document, or a 304 Not Modified response if it has not.

Types of Conditional GET


The client uses the time and date that the cached resource was created.

GET /document.htm HTTP/1.1
If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT


The client uses an E-Tag (entity tag) to identify the version of the cached file; the E-Tag was set by the server when the document was originally requested.

GET /document.htm HTTP/1.1
If-None-Match: "686897696a7c876b7e"


The document has changed:

HTTP/1.1 200 OK

The document has not changed:

HTTP/1.1 304 Not Modified
Connection: close