If-Modified-Since

限时加码!20+主流AI编程工具免费用 购周边加赠Coding Plan Lite,Claude Code、Cursor等即刻畅享,学习进阶更高效! 阅读详情
  参考: If-Modified-Since

14.25 If-Modified-Since

The If-Modified-Since request-header field is used with a method to make it conditional: if the requested variant has not been modified since the time specified in this field, an entity will not be returned from the server; instead, a 304 (not modified) response will be returned without any message-body.

       If-Modified-Since = "If-Modified-Since" ":" HTTP-date

An example of the field is:

       If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT

A GET method with an If-Modified-Since header and no Range header requests that the identified entity be transferred only if it has been modified since the date given by the If-Modified-Since header. The algorithm for determining this includes the following cases:

      a) If the request would normally result in anything other than a
         200 (OK) status, or if the passed If-Modified-Since date is
         invalid, the response is exactly the same as for a normal GET.
         A date which is later than the server's current time is
         invalid.
      b) If the variant has been modified since the If-Modified-Since
         date, the response is exactly the same as for a normal GET.
      c) If the variant has not been modified since a valid If-
         Modified-Since date, the server SHOULD return a 304 (Not
         Modified) response.

The purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead.

      Note: The Range request-header field modifies the meaning of If-
      Modified-Since; see section 14.35 for full details.
      Note: If-Modified-Since times are interpreted by the server, whose
      clock might not be synchronized with the client.
      Note: When handling an If-Modified-Since header field, some
      servers will use an exact date comparison function, rather than a
      less-than function, for deciding whether to send a 304 (Not
      Modified) response. To get best results when sending an If-
      Modified-Since header field for cache validation, clients are
      advised to use the exact date string received in a previous Last-
      Modified header field whenever possible.
      Note: If a client uses an arbitrary date in the If-Modified-Since
      header instead of a date taken from the Last-Modified header for
      the same request, the client should be aware of the fact that this
      date is interpreted in the server's understanding of time. The
      client should consider unsynchronized clocks and rounding problems
      due to the different encodings of time between the client and
      server. This includes the possibility of race conditions if the
      document has changed between the time it was first requested and
      the If-Modified-Since date of a subsequent request, and the
      possibility of clock-skew-related problems if the If-Modified-
      Since date is derived from the client's clock without correction
      to the server's clock. Corrections for different time bases
      between client and server are at best approximate due to network
      latency.

The result of a request having both an If-Modified-Since header field and either an If-Match or an If-Unmodified-Since header fields is undefined by this specification. 



ajax缓存--("If-Modified-Since","0") - haochangjun的专栏 - ...
if(window.XMLHTTPRequest){ xmlHTTP = new XMLHTTPRequest(); }}function getHTMLinfo(URL){ createXMLHTTP(); xmlHTTP.open("get", URL, true); xmlHTTP.onreadystatechange = callHTML; xmlHTTP.setRequestHeader("If-Modified-Since...
blog.csdn.net/haochangjun/archive/2008/06 ... 19K 2008-6-30 - 百度快照

http1.1---9 - xzjxu的专栏 - CSDNBlog
If-Modified-Since The If-Modified-Since request-header field is used with the GET method to make it ...If-Modified-Since = "If-Modified-Since" ":" HTTP-date An example of the field is: If-Modified-Since: ...
blog.csdn.net/xzjxu/archive/ ... /6648.aspx 60K 2008-4-3 - 百度快照

关于浏览器的缓存和getLastModified()的使用问题。 - hnsc的专栏 ..
如果getLastModified方法的返回值是一个正数,并且客户端的请求消息中没有包含If-Modified-Since头字段的(这种情况是第一次访问该页面时)或者是请求消息中包含If-Modified-Since头字段,但是返回值比If-Modified-Since头字段指定的时间新的话,...
blog.csdn.net/hnsc/archive/ ... /1414316.aspx 16K 2008-5-26 - 百度快照

Scott Mitchell 的ASP.NET 2.0数据教程之第55: 在Data Web控件...
GETs,这样的话,客户端使HTTP请求发送一个If-Modified-Since HTTP header。If-Modified-Since HTTP header包含了客户端...关于If-Modified-Since header和conditional GET的详细信息请参阅文章《 HTTP Conditional GET for RSS Hackers 》和《...
blog.csdn.net/heker2007/archive/2007/04/0 ... 58K 2007-5-15 - 百度快照

浏览器缓存内幕与getLastModified方法 - Andrew Wang的专栏 - CSD..
只有文档的修改时间比If-Modified-Since请求头指定的时间新时,服务器才会返回文档内容。如果自从If-Modified-Since指定...HttpServlet类为If-Modified-Since请求头和Last-Modified头字段的这种应用提供了处理机制,当继承了HttpServlet类的...
blog.csdn.net/andydevelope/archive/2006/0 ... 43K 2008-5-8 - 百度快照

rfc1945-http1.0自译本-(7) - chifire的专栏 - CSDNBlog
从何时更改(If-Modified-Since) If-Modified-Since请求标题域和GET方法一起使用,用于处理下面情况:当在该域指定的...如果资源在If-Modified-Since日期以后有变化,回应也和普通GET一样 c) 如果资源在If-Modified-Since日期以后没变化,...
blog.csdn.net/chifire/archive/ ... /3749.aspx 89K 2008-5-15 - 百度快照

web开发中的缓存问题的研究(二) - 海蓝蓝的专栏 - CSDNBlog
只有文档的修改时间比If-Modified-Since请求头指定的时间新时,服务器才会返回文档内容。如果自从If-Modified-Since指定...HttpServlet类为If-Modified-Since请求头和Last-Modified头字段的这种应用提供了处理机制,当继承了HttpServlet类的...
blog.csdn.net/hailanlan1223/archive/2006/ ... 23K 2008-5-25 - 百度快照

Servlet学习 - 学而不思则罔, 思而不学则殆 - CSDNBlog
当getLastModified方法返回一个正数,且请求消息中没有包含If-Modified-Since,或者请求消息的If-Modified-Since中的时间值比getLastModified方法返回的时间值旧时,service调用doGet方法。 3. getLastModified返回值与If-Modified-Since时间值相同或...
blog.csdn.net/lybra/archive/2008/03/16/21 ... 29K 2008-3-31 - 百度快照

web开发中的缓存问题的研究 - 绯红游侠 - CSDNBlog
只有文档的修改时间比If-Modified-Since请求头指定的时间新时,服务器才会返回文档内容。如果自从If-Modified-Since指定...HttpServlet类为If-Modified-Since请求头和Last-Modified头字段的这种应用提供了处理机制,当继承了HttpServlet类的...
blog.csdn.net/yangjiyue/archive/2007/12/0 ... 37K 2008-6-21 - 百度快照

HTTP 协议学习笔记 - 西门吹雪的专栏 - CSDNBlog
If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT If-Modified-Since请求标题域和GET方法一起使用,用于处理下面情况:当在该域指定的日期以来,请求资源没有 发生任何变更。这时,服务器将不会下传该资源的拷贝,即,回应不带任何...
blog.csdn.net/zhaokugua/archive/2008/05/2 ... 26K 2008-6-6 - 百度快照


什么函数库可以把HTTP应答的“Last-Modified: Wed, 03 Sep 2008 05:12:12 GMT”这样的日期格式转化为COleDateTime或其他数据格式也可以。
Last-ModifiedIf-Modified-Since 如何使用 在这个例子中,If-Modified-Since 头告诉服务器,如果资源自 2022 年 1 月 3 日 08:00:00 GMT 以来没有被修改,那么就返回 304 Not Modified 状态码,不返回资源内容。3.如果资源自 If-Modified-Since 以来没有被修改,服务器会返回 304 Not Modified 状态码,不返回资源内容。2.客户端再次请求同一资源时,会在请求中包含 If-Modified-Since 头,其值为上次响应中 Last-Modified 的值。 阅读详情

相关推荐

HTTP请求头标签 If-Modified-Since

先说说If-Modified-Since的作用吧: If-Modified-Since是标准的HTTP请求头标签,在发送HTTP请求时,把浏览器端缓存页面的最后修改时间一起发到服务器去,服务器会把这个时间与服务器上实际文件的最后修改时间进行比较。   如果时间一致,那么返回HTTP状态码304(不返回文件内容),客户端接到之后,就直接把本地缓存文件显示到浏览器中。   如果时间不一致,就返回

StanleyQiu的专栏 9203

file ' ' has been modified since the precompiled header ' ' was built

debug,和release的sdi都设置成i

jimmychan的博客 1302

Restful If-Modified-Since Last-Modified Http缓存、本地缓存 Etag

浏览器发送HTTP请求时,把If-Modified-Since一起发到服务器去,服务器会把这个时间与服务器上实际文件的最后修改时间进行比较。响应200,http头有标签:Last-Modifieddate),即服务器本地记录的文件最后修改时间。如果时间不一致,就返回HTTP状态码200和新的文件内容,客户端接到之后,会丢弃旧文件,把新文件缓存起来,并显示到浏览器中。浏览器第二次请求时,携带If-Modified-Sincedate),请求: 携带If-Modifie-since

Kaizen的博客 728

fatal error: file has been modified since the precompiled header

新开一个测试项目,编译时报错fatal error: file '/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIApplication

一个程序猿的故事 1950

[nodemon] app crashed - waiting for file changes before starting...解决方法

先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在。深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小。因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担。1.开始---->运行---->cmd,或者是window+R组合键,调出命令窗口。记住最后那一栏的数字,是PID,这里是”21996“....

m0_67393619的博客 2万+

ℬ悟透C++┇Puzzle记录

东周列国志》第一百二回:“及秦使捧国书来,欲与魏息兵修好,叩其来意,都是敬慕信陵之语,又接得太子增家信,心中愈加疑惑。①《墨子·公孟》:“若大人行淫暴於国家,进而谏,则谓之不逊;因左右而献谏,则谓之言议,此君子之所疑惑也。②《后汉书·张衡传》:“亲履艰难者知下情,备经险易者达物伪。故能一贯万机,靡所疑惑,百揆允当,庶绩咸熙。④巴金《家》七:“剑云抬起头来看琴的脸,他的脸上现出疑惑的表情。③唐刘知几《史通·论赞》:“夫论者所以辩疑惑,释凝滞。迷惑,不理解,不明白,不清楚。

itzyjr的专栏 1012

HTTP的请求头标签 If-Modified-Since与Last-Modified

1.基本定义Last-ModifiedIf-Modified-Since 都是标准的HTTP请求头标签,用于记录页面的最后修改时间。2.发送方向Last-Modified 是由服务器发送给客户端的HTTP请求头标签If-Modified-Since 则是由客户端发送给服务器的HTTP请求头标签3.应用场景(1)Last-Modified在浏览器第一次请求某一个URL时,服务器端的返回状态会是2...

罗先森何其有幸的博客 2万+

HTTP的请求头标签—IMS(If-Modified-Since)

一、简单介绍 If-Modified-Since:表示浏览器缓存记录中该文件的最后服务器修改时间,由客户端发送给服务器。 (一般If-Modified-Since会与Last-Modified成对出现) Last-Modified:表示服务器本地记录中的文件最后修改时间,由服务器发送给客户端。 二、实验 [^1] (一)步骤 1、清空IE浏览器缓存 2、启动Wireshark 3、在浏览器中输入以...

Haber。 3771

有关Last-ModifiedIf-Modified-Since

<br />在http中Last-ModifiedIf-Modified-Since 都是用于记录页面最后修改时间的 HTTP 头信息,注意,在这 Last-Modified 是由服务器往客户端发送的 HTTP 头,另一个 If-Modified-Since是由客户端往服务器发送的头,可以看到,再次请求本地存在的 cache 页面时,客户端会通过 If-Modified-Since 头将先前服务器端发过来的 Last-Modified 最后修改时间戳发送回去,这是为了让服务器端进行验证,通过这个时间戳判

taipingliebeiluo的专栏 1万+

HTTP If-Modified-Since 请求头的作用:缓存校验

If-Modified-Since是HTTP客户端的标准请求头,用来发送给服务器,HTTP服务器端根据If-Modified-Since的值来判断是否要返回最新的响应。服务端200会响应返回Last-Modified来标记最新的修改时间。 第一次请求 第一次请求后,浏览器会把响应文件缓存住。 第二次请求 第二次请求前,在浏览器请求头里加上If-Modified-SinceIf-Modified-Since值也跟Last-Modified值一致,服务端会响应304,并且不会发送文件内容,节约了网络流量。

小龙在线 6362

http中Last-ModifiedIf-Modified-Since的说明

在http中Last-ModifiedIf-Modified-Since 都是用于记录页面最后修改时间的 HTTP 头信息,注意,在这 Last-Modified 是由服务器往客户端发送的 HTTP 头,另一个 If-Modified-Since是由客户端往服务器发送的头,可以看到,再次请求本地存在的 cache 页面时,客户端会通过 If-Modified-Since 头将先前服务器端发

成长的味道 1万+

【计网面试真题】If-Modified-Since和Etag有什么区别

另外,如果资源的最后修改时间改变了,但内容并未实际变化,也会触发资源重新下载。字段,它是资源的唯一标识符,通常是资源的哈希值、版本号或某种其他算法生成的标识。字段告知客户端资源的最后修改时间,客户端缓存该时间。提供了更高的精度,适用于资源可能频繁修改或修改时间不易确定的情况。:可以精确判断资源内容的变化,甚至支持相同内容的不同资源版本。发送给服务器,服务器检查资源是否在该时间之后被修改。(通常是资源内容的哈希值)来精确判断资源是否被修改。:适用于资源变化不频繁且修改时间精确的情况。来判断资源是否被修改。

weixin_63681863的博客 940

HTTP 协商缓存 Last-Modified,If-Modified-Since

一般来说,在没有调整服务器时间和篡改客户端缓存的情况下,这两个essay-header配合起来管理协商缓存是非常可靠的,但是有时候也会服务器上资源其实有变化,但是最后修改时间却没有变化的情况,就会影响协商缓存的可靠性。如果协商缓存没有命中,浏览器直接从服务器加载资源时,Last-Modified Header在重新加载的时候会被更新,下次请求时,If-Modified-Since会启用上次返回的Last-Modified值。浏览器第一次跟服务器请求一个资源,服务器在返回这个资源的同时,在。

小楼一夜听春雨,深巷明朝卖杏花 1199

设置If-Modified-Since

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_33767813的博客 1581

php取得http_if_modified_since,If-Modified-Since

If-Modified-SinceIf-Modified-Since请求的HTTP标头发出请求的条件:服务器会发送回所请求的资源,用200状态,只有当它已经给定的日期之后被最后修改。如果请求没有被修改,那么响应将是304没有任何主体的;Last-Modified头将包含最后一次修改的日期。不同于If-Unmodified-SinceIf-Modified-Since只能与GET或HEAD一起使用...

weixin_39702639的博客 337

HTTP的请求头标签 If-Modified-Since

一直以来没有留意过HTTP请求头的IMS(If-Modified-Since)标签。   最近在分析Squid的access.log日志文件时,发现了一个现象。   就是即使是对同一个文件进行HTTP请求,第一次和第二次产生的网络流量数据也是不一致的。   在调查的过程中,逐渐了解了HTTP的If-Modified-Since的头标签的作用。   大家都知道客户端浏览器是有缓存的,里面存放...

编程哲学家的专栏 804

HTTP缓存机制的Etag、Last-ModifiedIf-None-Match和If-Modified-Since、Expires和Cache-Control笔记

http缓存机制:https://blog.csdn.net/jutal_ljt/article/details/80021545 http://www.cnblogs.com/chenqf/p/6386163.html 相关文章: 闲聊HTTP闲聊HTTP/2.0闲聊HTTPSHTTP缓存机制的Etag、Last-ModifiedIf-None-Match和If-Modified-...

卓越无关环境,保持空杯心态——靡不有初,鲜克有终 6090

Expires、Cache-Control、Last-ModifiedIf-ModifiedSince、Etag和If-None-Match

1.Expires 页面的初次访问者会进行很多HTTP请求,但是通过使用一个长久的Expires头,可以使这些组件被缓存,下次访问的时候,就可以减少不必要的HTPP请求,从而提高加载速度。 Web服务器通过Expires头告诉客户端可以使用一个组件的当前副本,直到指定的时间为止。例如: Expires: Fri, 18 Mar 2016 07:41:53 GMT Expires缺点: 它要求服务...

yangyang的专栏 1793
上一篇: C++ 的 try throw catch 反汇编方法 收藏
下一篇: HTTP 协议学习笔记收藏
skyremember
博客等级 码龄20年 203粉丝 484原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值