HTML DOM Document referrer Property
- Previous Page readyState
- Next Page removeEventListener()
- Go to the Previous Level HTML DOM Documents
Definition and Usage
referrer
The property returns the URL of the document that loaded the current document.
referrer
The property is read-only.
Syntax
document.referrer
Return value
Type | Description |
---|---|
String |
The URL of the document that loaded the current document. Returns an empty string if the document is not opened through a link. |
Browser support
document.referrer
It is a feature of DOM Level 2 (2001).
All browsers support it:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | 9-11 | Support | Support | Support | Support |
- Previous Page readyState
- Next Page removeEventListener()
- Go to the Previous Level HTML DOM Documents