Export (0) Print
Expand All
all
alt
ch
dir
id
min
rel
top
url
URL
urn
Expand Minimize

referrer property

Gets the URL of the location that referred the user to the current document.

Syntax

JavaScript

p = object.referrer

Property values

Type: String

A String that specifies the URL of the referring document.

Standards information

Remarks

This property returns a value only when the user reaches the current document through a link from the previous document. Otherwise, document.referrer returns an empty string; it also returns an empty string when the link is from a secure site.

For example, if DocumentA.htm includes a link to DocumentB.htm, and the user clicks that link, the document.referrer on DocumentB.htm returns "DocumentA.htm." However, if the user is on DocumentA.htm and types DocumentB.htm into the address line or chooses the Open command from the File menu to get to DocumentB.htm, the document.referrer returns an empty string.

See also

document

 

 

Show:
© 2014 Microsoft