The Warning general HTTP header contains information about possible problems with the status of the message. More than one Warning header may appear in a response.
Warning header fields can in general be applied to any message, however some warn-codes are specific to caches and can only be applied to response messages.
| Header type | {{Glossary("General header")}} |
|---|---|
| {{Glossary("Forbidden header name")}} | no |
Syntax
Warning: <warn-code> <warn-agent> <warn-text> [<warn-date>]
Directives
- <warn-code>
- A three-digit warning number. The first digit indicates whether the
Warningis required to be deleted from a stored response after validation.1xxwarn-codes describe the freshness or validation status of the response and will be deleted by a cache after deletion.-
2xxwarn-codes describe some aspect of the representation that is not rectified by a validation and won't be deleted by a cache after validation unless a full response is sent.
- <warn-agent>
-
The name or pseudonym of the server or software adding the
Warningheader (might be "-" when the agent is unknown). - <warn-text>
- Advisory text describing the error.
- <warn-date>
- Optional. If more than one
Warningheader is sent, include a date that matches the {{HTTPHeader("Date")}} header.
Warning codes
| Code | Text | Description |
|---|---|---|
| 110 | ||
| 111 | ||
| 112 | ||
| 113 | ||
| 199 | ||
| 214 | ||
| 299 |
Examples
Warning: 110 anderson/1.3.37 "Response is stale" Date: Wed, 21 Oct 2015 07:28:00 GMT Warning: 112 - "network down" "Wed, 21 Oct 2015 07:28:00 GMT"
Specifications
| Specification | Title |
|---|---|
| {{RFC("7234", "Warning", "5.5")}} | Hypertext Transfer Protocol (HTTP/1.1): Caching |
Browser compatibility
The compatibility table in this page is generated from structured data. If you’d like to contribute to the data, please check out https://github.com/mdn/browser-compat-data/README.md and send us a pull request.
{{Compat}}
See also
- {{HTTPHeader("Date")}}
- HTTP respnose status codes