X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML DOM referrer Property

Document Object Reference Document Object

Example

Return the referrer of the current document:

document.referrer;

Try it yourself »


Definition and Usage

The referrer property returns the URL of the document that loaded the current document.


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The referrer property is supported in all major browsers.


Syntax

document.referrer

Technical Details

Return Value: A string containing the URL of the document that loaded the current document. If the current document was not opened through a link (for example, through a bookmark), an empty string is returned.
DOM Version Core Level 2 Document Object


Document Object Reference Document Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates

SHARE THIS PAGE

facebook