Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1104021 of Warning

  • Revision slug: Web/HTTP/Headers/Warning
  • Revision title: Warning
  • Revision id: 1104021
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment new page

Revision Content

{{HTTPSidebar}}

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 Warning 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 deletion.
  • 2xx warn-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 Warning header (might be "-" when the agent is unknown).

<warn-text>
Advisory text describing the error.
<warn-date>
Optional. If more than one Warning header 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

{{Compat}}

See also

Revision Source

<div>{{HTTPSidebar}}</div>

<p>The <strong><code>Warning</code></strong> general HTTP header contains information about possible problems with the status of the message. More than one <code>Warning</code> header may appear in a response.</p>

<p><code>Warning</code> 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.</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Header type</th>
   <td>{{Glossary("General header")}}</td>
  </tr>
  <tr>
   <th scope="row">{{Glossary("Forbidden header name")}}</th>
   <td>no</td>
  </tr>
 </tbody>
</table>

<h2 id="Syntax">Syntax</h2>

<pre class="syntaxbox">
Warning: &lt;warn-code&gt; &lt;warn-agent&gt; &lt;warn-text&gt; [&lt;warn-date&gt;]
</pre>

<h2 id="Directives">Directives</h2>

<dl>
 <dt>&lt;warn-code&gt;</dt>
 <dd>A three-digit warning number. The first digit indicates whether the <code>Warning</code> is required to be deleted from a stored response after validation.
 <ul>
  <li><code>1xx</code> warn-codes describe the freshness or validation status of the response and will be deleted by a cache after deletion.</li>
  <li>
   <p><code>2xx</code> warn-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.</p>
  </li>
 </ul>
 </dd>
 <dt>&lt;warn-agent&gt;</dt>
 <dd>
 <p>The name or pseudonym of the server or software adding the <code>Warning</code> header (might be "-" when the agent is unknown).</p>
 </dd>
 <dt>&lt;warn-text&gt;</dt>
 <dd>Advisory text describing the error.</dd>
 <dt>&lt;warn-date&gt;</dt>
 <dd>Optional. If more than one <code>Warning</code> header is sent, include a date that matches the {{HTTPHeader("Date")}} header.</dd>
</dl>

<h2>Warning codes</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Code</th>
   <th scope="col">Text</th>
   <th scope="col">Description</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>110</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>111</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>112</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>113</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>199</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>214</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>299</td>
   <td>&nbsp;</td>
   <td>&nbsp;</td>
  </tr>
 </tbody>
</table>

<h2 id="Examples">Examples</h2>

<pre>
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"
</pre>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Title</th>
  </tr>
  <tr>
   <td>{{RFC("7234", "Warning", "5.5")}}</td>
   <td>Hypertext Transfer Protocol (HTTP/1.1): Caching</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p class="hidden">The compatibility table in this page is generated from structured data. If you’d like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data/README.md">https://github.com/mdn/browser-compat-data/README.md</a> and send us a pull request.</p>

<p>{{Compat}}</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{HTTPHeader("Date")}}</li>
 <li><a href="/en-US/docs/Web/HTTP/Status">HTTP respnose status codes</a></li>
</ul>
Revert to this revision