Open In App

HTTP headers | If-Unmodified-Since

The HTTP If-Unmodified-Since header is a request-type header and makes the request conditional on having a last-modified timestamp. The server will perform the requested operation only if the requested source has not been modified after a specified date. In case, the requested source has been modified then the server will not perform the requested operation and respond with a 412 error (Precondition Failed)

Let us consider a scenario, a patient goes to a medical laboratory to get his BMI test. The lab attendant records his height and weight and tells him to collect the reports within 2 days. Due to some reasons, the patient could not collect the reports and goes to the laboratory after a month. But the lab attendant doesn’t give him the reports and informs him that the tests will be valid only if his weight is still unchanged(or unmodified), otherwise, the result has become inconsistent. This is how our If-Unmodified-Since HTTP header works. 



Syntax: 

If-Unmodified-Since: <day-name>, <day> <month> <year>
<hour>:<minute>:<second> GMT 

Directives: The HTTP If-Unmodified-Since header accept below described directives:  



Example:  

If-Unmodified-Since: Fri, 10 Feb 2004 06:20:00 GMT

Note: This reduces bandwidth usage and improves the speed of your website. 

Supported Browsers: The browsers are compatible with HTTP If-Unmodified-Since header are listed below:  

 

Article Tags :