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 1098197 of Referer

  • Revision slug: Web/HTTP/Headers/Referer
  • Revision title: Referer
  • Revision id: 1098197
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment

Revision Content

{{HTTPSidebar}}

The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.

Note that referer is actually a misspelling of the word "referrer". See {{interwiki("wikipedia", "HTTP_referer", "HTTP referer on Wikipedia")}} for more details.

The Referer header has the potential to reveal information about the browsing history of the user, which is a privacy concern.

A Referer header is not sent if:

  • the referring resource is a local "file" or "data" URI,
  • an unsecured HTTP request is used and the referring page was received with a secure protocol (HTTPS).

Header type {{Glossary("Request header")}}
{{Glossary("Forbidden header name")}} yes

Syntax

Referer: <url>

Directives

<url>
fo

Examples

Referer: https://developer.mozilla.org/en-US/docs/Web/JavaScript

Specifications

Specification Title
{{RFC("7231", "Referer", "5.5.2")}} Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content

Browser compatibility

{{Compat}}

See also

  • {{interwiki("wikipedia", "HTTP_referer", "HTTP referer on Wikipedia")}}

Revision Source

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

<p>The <code><strong>Referer</strong></code> request header contains the address of the previous web page from which a link to the currently requested page was followed. The <code>Referer</code> header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.</p>

<p>Note that referer is actually a misspelling of the word "referrer". See {{interwiki("wikipedia", "HTTP_referer", "HTTP referer on Wikipedia")}} for more details.</p>

<p>The <code>Referer</code> header has the potential to reveal information about the browsing history of the user, which is a privacy concern.</p>

<p>A <code>Referer</code> header is not sent if:</p>

<ul>
 <li>the referring resource is a local "file" or "data" URI,</li>
 <li>
  <p>an unsecured HTTP request is used and the referring page was received with a secure protocol (HTTPS).</p>
 </li>
</ul>

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

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

<pre class="syntaxbox">
Referer: &lt;url&gt;
</pre>

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

<dl>
 <dt>&lt;url&gt;</dt>
 <dd>fo</dd>
</dl>

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

<pre>
Referer: https://developer.mozilla.org/en-US/docs/Web/JavaScript</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("7231", "Referer", "5.5.2")}}</td>
   <td>Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</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>{{interwiki("wikipedia", "HTTP_referer", "HTTP referer on Wikipedia")}}</li>
</ul>
Revert to this revision