Reputation: 247
I am new to working with the Rest API in Java. I am trying to implement if-modified-since
request and got stuck with questions:
Last-Modified
header. From then on, client sends a request with the Last-Modified
in the if-modified-since
header. Does this mean that, the first get request from client does not have a if-modified-since
header ?Last-Modified
received in the response stored in the browser for ever or should it be stored some where in the client side database to make further requests?Upvotes: 0
Views: 1887
Reputation: 1398
No, there won't be an if-modified-since if the client does not have a cached version of the resource.
This is up to the client. Browsers certainly don't cache everything indefinitely. But in theory an arbitrary client could store the last modified timestamp wherever it needs to.
Upvotes: 1