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 1106275 of Pragma

  • Revision slug: Web/HTTP/Headers/Pragma
  • Revision title: Pragma
  • Revision id: 1106275
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

{{HTTPSidebar}}

The Pragma HTTP/1.0 general header is an implementation-specific header that may have various effects along the request-response chain. It is used for backwards compatibility with HTTP/1.0 caches where the Cache-Control HTTP/1.1 header is not yet present.

Note: Pragma is not specified for HTTP responses and is therefore not a reliable replacement for the general HTTP/1.1 Cache-Control header, although it does behave the same as Cache-Control: no-cache, if the Cache-Control header field is omitted in a request. Use Pragma only for backwards compatibility with HTTP/1.0 clients.

Header type {{Glossary("General header")}}, but response behavior is not specified and thus implementation-specific.
{{Glossary("Forbidden header name")}} no

Syntax

Pragma: no-cache

Directives

no-cache

Same as Cache-Control: no-cache. Forces caches to submit the request to the origin server for validation before releasing a cached copy.

Examples

Pragma: no-cache

Specifications

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

Browser compatibility

{{Compat}}

See also

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

Revision Source

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

<p>The <code><strong>Pragma</strong></code> HTTP/1.0 general header is an implementation-specific header that may have various effects along the request-response chain. It is used for backwards compatibility with HTTP/1.0 caches where the <code>Cache-Control</code> HTTP/1.1 header is not yet present.</p>

<div class="note">
<p><strong>Note</strong>: <code>Pragma</code> is not specified for HTTP responses and is therefore not a reliable replacement for the general HTTP/1.1 <code>Cache-Control</code> header, although it does behave the same as <code>Cache-Control: no-cache</code>, if the <code>Cache-Control</code> header field is omitted in a request. Use <code>Pragma</code> only for backwards compatibility with HTTP/1.0 clients.</p>
</div>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Header type</th>
   <td>{{Glossary("General header")}}, but response behavior is not specified and thus implementation-specific.</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">
Pragma: no-cache
</pre>

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

<dl>
 <dt>no-cache</dt>
 <dd>
 <p>Same as <code>Cache-Control: no-cache</code>. Forces caches to submit the request to the origin server for validation before releasing a cached copy.</p>
 </dd>
</dl>

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

<pre>
Pragma: no-cache</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", "Pragma", "5.4")}}</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("Expires")}}</li>
</ul>
Revert to this revision