Referrer of a page by document referrer propertyWe can use document.referrer property to get the referrer to this page. What is a referrer ? Very basic answer is how you have arrived at this page. You could have clicked a link in some other page of this site or some other site. You could have searched for a key word in search engine and clicked a link at search result page to arrive at this page. In this case the search engine page has became the referrer for this page. But if you have typed the address or url of this page in the address bar of your browser and opened this page then there is no referrer and the value of referrer became blank or null.
Here is the output ( if your browser referrer is available )