Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | DOM referrer Property

  • Last Updated : 13 Aug, 2021

The DOM referrer property in HTML is used to return the URI of the page that linked to the current page. If the user navigates to the page directly or through a bookmark, then this value is an empty string.


Return Value: A String, representing the URL of the document that loaded the current document. Returns the entire URL, including the protocol (like http://). If the current document was not opened through a link (for example, through a bookmark), an empty string is returned.

Below program illustrates the referrer property in HTML:
Example: There are 3 pages which link each other and specify their referrer property below.







Supported Browsers: The browser supported by DOM referrer property are listed below: 

  • Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!