https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Modified-Sinceで読みました:
# If-Modified-Since
If the resource has not been modified since, the response will be a 304 without any body;
したがって、たとえばhttps://en.vikidia.org/wiki/Computerで API 呼び出しを処理します。
# Request
GET /wiki/Batman HTTP/2
Host: en.vikidia.org
Referer: https://duckduckgo.com/
If-Modified-Since: Wed, 19 May 2021 12:55:57 GMT
[...]
# Response
scheme: https
host: en.vikidia.org
filename: /wiki/Batman
Adress: 104.21.15.203:443
Version: HTTP/2
Transfert: 7.67 Ko (size 23.64 Ko)
Referer: https://duckduckgo.com/
Status: 304 Not Modified
[...]
# Response header
last-modified: Wed, 19 May 2021 12:55:57 GMT
質問:
- データとコード ステータスの両方を受け取るのはなぜですか?
304
これは論理的に見えますが、仕様に反しているようにも見えます (上記のリンクを参照) - なぜ
Wed, 19 May 2021 12:55:57 GMT
具体的に?そして、誰がこの特定の日付を要求したのですか (duckduckgo? Vikidia から直接ページを要求したときに If-Modified-Since タグがないため)?