Document.referrer

  • Revision slug: DOM/document.referrer
  • Revision title: document.referrer
  • Revision id: 10197
  • Created:
  • Creator: Dria
  • Is current revision? No
  • Comment

Revision Content

{{template.DomRef()}}

Summary

Returns the URI of the page that linked to this page.

Syntax

string = document.referrer 

Notes

The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark). Note that since this property returns only a string it does not give you DOM access to the referring page.

Specification

referrer

Revision Source

<p>
{{template.DomRef()}}
</p>
<h3 name="Summary">Summary</h3>
<p>Returns the URI of the page that linked to this page. 
</p>
<h3 name="Syntax">Syntax </h3>
<pre class="eval"><i>string</i> = document.referrer 
</pre>
<h3 name="Notes">Notes </h3>
<p>The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark). 
Note that since this property returns only a string it does not give you DOM access to the referring page. 
</p>
<h3 name="Specification">Specification </h3>
<p><a class="external" href="http://www.w3.org/TR/2000/WD-DOM-Level-2-HTML-20001113/html.html#ID-95229140">referrer </a>
</p>
Revert to this revision