English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML DOM referrer Property

HTML DOM Document Object

referrerProperty that returns the URL of the source document loaded into the current document.

Syntax:

document.referrer
    var x = document.referrer;

The result of x will be:

Browser Compatibility

All browsers fully support the Referrer property:

Property
referrerYesYesYesYesYes

Technical Details

Return Value:A string, the property returns the URL of the source document loaded into the current document. If the user navigates directly to this page (not through a link, but for example through a bookmark), an empty string is returned.
DOM Version:DOM 2Level

HTML DOM Document Object