?
This document uses PHP Chinese website manual Release
Warning
一般 HTTP 標(biāo)頭包含有關(guān)該消息的狀態(tài)可能出現(xiàn)的問題的信息。Warning
響應(yīng)中可能會出現(xiàn)多個標(biāo)題。
Warning
標(biāo)題字段通??梢詰?yīng)用于任何消息,但某些警告代碼是特定于高速緩存的,只能應(yīng)用于響應(yīng)消息。
Header type | General header |
---|---|
Forbidden header name | no |
Warning: <warn-code> <warn-agent> <warn-text> [<warn-date>]
<警告碼>一個三位警告號碼。第一位數(shù)字表示是否Warning
需要在驗證后從存儲的響應(yīng)中刪除。
1xx
警告代碼描述響應(yīng)的新鮮度或驗證狀態(tài),并在刪除后由緩存刪除。
2xx
警告代碼描述了未通過驗證糾正的表示的某些方面,并且驗證后不會被緩存刪除,除非發(fā)送完整的響應(yīng)。
<warn-agent>
添加Warning
標(biāo)題的服務(wù)器或軟件的名稱或假名(代理未知時可能為“ - ”)。
<warn-text> 描述錯誤的建議文本 <warn-date> 可選。如果Warning
發(fā)送多個標(biāo)題,請包含與Date
標(biāo)題匹配的日期。
iana.org 上的 HTTP 警告代碼注冊表定義了警告代碼的命名空間。
Code | Text | Description |
---|---|---|
110 | Response is Stale | A response provided by a cache is stale (the expiration time set for it has passed). |
111 | Revalidation Failed | An attempt to validate the response failed, due to an inability to reach the server. |
112 | Disconnected Operation | The cache is disconnected from the rest of the network. |
113 | Heuristic Expiration | Sent If a cache heuristically chose a freshness lifetime greater than 24 hours and the response's age is greater than 24 hours. |
199 | Miscellaneous Warning | Arbitrary, non-specific warning |
214 | Transformation Applied | Added by a proxy if it applies any transformation to the representation, such as changing the content-coding, media-type or the like. |
299 | Miscellaneous Warning | Same as 199, but indicating a persistent warning |
Warning: 110 anderson/1.3.37 "Response is stale"Date: Wed, 21 Oct 2015 07:28:00 GMT Warning: 112 - "cache down" "Wed, 21 Oct 2015 07:28:00 GMT"
Specification | Title |
---|---|
RFC 7234, section 5.5: Warning | Hypertext Transfer Protocol (HTTP/1.1): Caching |
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic Support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
Feature | Android | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic Support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |