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 1103473 of Expires

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

Revision Content

{{HTTPSidebar}}

The Expires header contains the date/time after which the response is considered stale.

Invalid dates, like the value 0, represent a date in the past and mean that the resource is already expired.

If there is a {{HTTPHeader("Cache-Control")}} header with the "max-age" or "s-max-age" directive in the response, the Expires header is ignored.

Header type {{Glossary("Response header")}}
{{Glossary("Forbidden header name")}} no

Syntax

Expires: <http-date>

Directives

<http-date>

An HTTP-date timestamp.

Examples

Expires: Wed, 21 Oct 2015 07:28:00 GMT

Specifications

Specification Title
{{RFC("7234", "Expires", "5.3")}} Hypertext Transfer Protocol (HTTP/1.1): Caching

Browser compatibility

{{Compat}}

See also

  • {{HTTPHeader("Cache-Control")}}
  • {{HTTPHeader("Age")}}

Revision Source

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

<p>The <code><strong>Expires</strong></code> header contains the date/time after which the response is considered stale.</p>

<p>Invalid dates, like the value 0, represent a date in the past and mean that the resource is already expired.</p>

<p>If there is a {{HTTPHeader("Cache-Control")}} header with the "max-age" or "s-max-age" directive in the response, the <code>Expires</code> header is ignored.</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Header type</th>
   <td>{{Glossary("Response 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">
Expires: &lt;http-date&gt;
</pre>

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

<dl>
 <dt>&lt;http-date&gt;</dt>
 <dd>
 <p>An HTTP-date timestamp.</p>
 </dd>
</dl>

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

<pre>
Expires: 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", "Expires", "5.3")}}</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("Cache-Control")}}</li>
 <li>{{HTTPHeader("Age")}}</li>
</ul>
Revert to this revision