开发者

What is the purpose of the "If-Modified-Since" parameter of the setRequestProperty method?

开发者 https://www.devze.com 2023-03-27 03:38 出处:网络
When we create a HttpConnection then we can call the setRequestProperty method and we can pass as its parameter (\"If-Modified-Since\",\"7 Sep 2005 19:43:31 GMT\") for example.

When we create a HttpConnection then we can call the setRequestProperty method and we can pass as its parameter ("If-Modified-Since","7 Sep 2005 19:43:31 GMT") for example.

开发者_运维技巧

I want to know when do we use the "If-Modified-Since" parameter , and what is its goal ?


The If-Modified-Since HTTP header requests that the server not bother to return the requested resource unless it has been modified since the specified date. If the resource has not been modified, a complying server would return a 304 (not modified) status instead.

See RFC 2616 for details, particularly section 14.25.

0

精彩评论

暂无评论...
验证码 换一张
取 消