If-Modified-Since:HTTP 请求头字段,用来告诉服务器“只有当资源在某个时间点之后被修改过,才返回最新内容”。如果资源自该时间以来未被修改,服务器通常会返回 304 Not Modified,从而节省带宽并加快加载。
/ɪf ˈmɑːdɪfaɪd sɪns/
The browser sent an If-Modified-Since header to avoid downloading the same file again.
浏览器发送了 If-Modified-Since 请求头,以避免再次下载相同的文件。
If the page hasn’t changed since yesterday, the server may reply with 304 Not Modified when it receives If-Modified-Since.
如果页面从昨天起没有变化,服务器在收到 If-Modified-Since 后可能会返回 304 Not Modified。
该表达来自 HTTP 报文头的命名习惯:以 If- 开头表示“条件请求”(conditional request),Modified 表示“已修改”,Since 表示“自从某个时间点”。合起来就是“如果自某时以来被修改过(再返回内容)”。