[34] If-Modified-Since:
ヘッダーや
If-Unmodified-Since:
ヘッダーは、
対象資源の最終更新日時が指定した時刻の前後いずれかによって要求メソッドの処理を実行するか否かを指定するものです。
[8] If-Modified-Since:
ヘッダーや
If-Unmodified-Since:
ヘッダーは、
GET
や HEAD
の要求を選択された表現の最終変更日時に関する条件付き要求とします
>>12, >>25。
[18] If-Modified-Since:
は、
キャッシュされている実体タグを持たない表現を効率的に更新するために使うことができます
>>12。
[20] キャッシュの更新に使う時は普通はキャッシュされた Last-Modified:
の値を使って If-Modified-Since:
を生成します。
時計の同期が不十分な場合や何らかの理由で鯖側の Last-Modified:
が過去に戻った時のために鯖が時刻を完全一致にしているような場合があるので、
これが最も相互運用性が高い動作です。しかし、Last-Modified:
がない場合に Date:
や手元の時計の時刻を使うなどして、
それ以外の時刻を生成する場合もあります。 >>12
[19] If-Modified-Since:
は、
Web の探索を最近の変更のみに限定するために使うことができます >>12。
[21] 利用者エージェントは取得の時間範囲を限定する場合には手元の時計の次オックを使ったり、
以前の応答の Date:
を使ったりします。
起源鯖が Last-Modified:
との完全一致を行っていると、
このような利用者エージェントでのデータ転送の削減の役には立ちません。 >>12
[27] If-Unmodified-Since:
は、
POST
、PUT
、
DELETE
のような状態を変更する要求メソッドにおいて、
別の利用者エージェントが並列に加えた変更を上書きしてしまう「lost update」
問題を避けるために使われます。 >>25
[28] If-Unmodified-Since:
は、
安全なメソッドにおいて、選択された表現が既に一部または全部が蓄積されているものと一致しない時に要求を中断するために使うこともできます。
>>25
[13] If-Modified-Since:
ヘッダーと
If-Unmodified-Since:
ヘッダーの値は、
HTTPの日時形式 (HTTP-date
) です >>12, >>25。
[26] 受信者は、If-Modified-Since:
や
If-Unmodified-Since:
の値を起源鯖の時計に照らして解釈しなければなりません
>>12, >>25。
[14] 選択された表現の最終変更日時が If-Modified-Since:
ヘッダーで指定された値と同じかそれ以前なら、
同ヘッダーの条件は真と判断しないべきです。 >>12
[33] 選択された表現の最終変更日時が If-Unmodified-Since:
ヘッダーで指定された値よりも最近なら、同ヘッダーの条件は真と判断してはなりません
>>25。
[305] Request Headers in the HTTP protocol ( ( 版)) <http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html#if-modified-since>
The If-Unmodified-Since request-header field is used with a method to make it conditional. If the requested resource has not been modified since the time specified in this field, the server
shouldSHOULD perform the requested operation as if the If-Unmodified-Since header were not present.
If-Unmodified-Since
要求頭欄は、それを条件付とする方式と共に使います。
要求された資源がこの欄に指定された時刻から修正されていなければ、
サーバーは、 If-Unmodified-Since
頭がなかった場合のように要求された操作を行うべきです。
If the requested variant has been modified since the specified time, the server MUST NOT perform the requested operation, and MUST return a 412 (Precondition Failed).
要求された変種が指定されたい時刻より修正されているなら、
サーバーは要求された操作を行ってはならず、
412
(前条件失敗) を返さなければなりません。
- If-Unmodified-Since = "If-Unmodified-Since" ":" HTTP-date
An example of the field is:
この欄の例:
- If-Unmodified-Since: Sat, 29 Oct 1994 19:43:31 GMT
If the request normally (i.e., without the If-Unmodified-Since header) would result in anything other than a 2xx or 412 status, the If-Unmodified-Since header
shouldSHOULD be ignored.
要求が通常なら (つまり、 If-Unmodified-Since
頭がなければ)
2xx
または 412
状態以外のものとなるならば、
If-Unmodified-Since
頭は無視するべきです。
If the specified date is invalid, the header is ignored.
指定された日付が不当なら、この頭は無視します。
The result of a request having both an If-Unmodified-Since header field and either an If-None-Match or an If-Modified-Since header fields is undefined by this specification.
If-Unmodified-Since
頭欄ならびに If-None-Match
頭欄または If-Modified-Since
頭欄のいずれかの両者を有する要求の結果はこの仕様書では未定義とします。
The If-Modified-Since request-header field is used with the DESCRIBE and SETUP methods to make them conditional. If the requested variant has not been modified since the time specified in this field, a description will not be returned from the server (DESCRIBE) or a stream will not be set up (SETUP). Instead, a 304 (not modified) response will be returned without any message-body.
[1] If-Modified-Since:
要求頭欄は、
DESCRIBE
メソッドや SETUP
メソッドで用いて、その要求を条件付とします。
要求された異体がこの欄で指定された時刻以後修正されていないなら、
鯖は記述を返さない (DESCRIBE
) か、
またはストリームを設定しません (SETUP
)。
その代わりに、message-body
無しの 304
(無修正) 応答を返します。
- [2] If-Modified-Since = "If-Modified-Since" ":" HTTP-date
An example of the field is:
- [3] If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
length
引数#✎[6] 90年代後半のWebブラウザーは length
引数を If-Modified-Since:
ヘッダーに含めることがありました。
[5] >>4 WinIE3.02 と NC 4.01 では確かに length
引数がつきました。
[307] Last-Modified が If-Modified-Since と一致すると IE6 は他がなにあってもキャッシュを使っちゃう。 ETag とか Vary とかつけてみたけど無視される。
[413] ウェブマスター向けガイドライン - ウェブマスター ツール ヘルプ ( ( 版)) <https://support.google.com/webmasters/answer/35769?hl=ja>
[414] RFC 2660 - The Secure HyperText Transfer Protocol ( ( 版)) <http://tools.ietf.org/html/rfc2660#section-5.2.5>
Changed in version 2.0: In previous versions, cache and concurrency control was handled using If-Modified-Since and If-Unmodified-Since. But since the HTTP date does not include milliseconds, they contained the milliseconds timestamp as integer. The current version using ETag is HTTP compliant (see original discussion.)