Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. HTTP
  3. Reference
  4. Headers
  5. Warning

Warning header

Deprecated: This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see thecompatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Note:The header was deprecated because it is not widely generated or surfaced to users (seeRFC9111).Some of the information can be inferred from other headers such asAge.

The HTTPWarningrequest andresponse header contains information about possible problems with the status of the message.More than oneWarning 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 typeRequest header,Response header
Forbidden request headerNo

Syntax

http
Warning: <warn-code> <warn-agent> <warn-text> [<warn-date>]

Directives

<warn-code>

A three-digit warning number. The first digit indicates whether theWarning is required to be deleted from a stored response after validation.

  • 1xx warn-codes describe the freshness or validation status of the response and will be deleted by a cache after successful validation.
  • 2xx warn-codes describe some aspect of the representation that is not rectified by a validation and will not 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 theWarning header (might be "-" when the agent is unknown).

<warn-text>

An advisory text describing the error.

<warn-date>Optional

A date. If more than oneWarning header is sent, include a date that matches theDate header.

Warning codes

TheHTTP Warn Codes registry at iana.org defines the namespace for warning codes.

CodeTextDescription
110Response is StaleThe response provided by a cache is stale (the expiration time set for the response has passed).
111Revalidation FailedAn attempt to validate the stale response failed due to an inability to reach the server.
112Disconnected OperationThe cache is intentionally disconnected from the rest of the network.
113Heuristic ExpirationA cache heuristically chose afreshness lifetime greater than 24 hours and the age of the response is greater than 24 hours.
199Miscellaneous WarningArbitrary information that should be presented to a user or logged.
214Transformation AppliedAdded by a proxy if it applies any transformation to the representation, such as changing the content-coding, media-type or the like.
299Miscellaneous Persistent WarningArbitrary information that should be presented to a user or logged. This warn-code is similar to the warn-code 199 and additionally indicates a persistent warning.

Examples

http
Warning: 110 anderson/1.3.37 "Response is stale"Date: Wed, 21 Oct 2015 07:28:00 GMTWarning: 112 - "cache down" "Wed, 21 Oct 2015 07:28:00 GMT"

Specifications

Specification
HTTP Caching
# field.warning

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp