The so-called "where they come from," referring to a user enters the current page from another page, URL to another page, such as my home page to jump from Baidu Baidu map, then the source of visitors is: www.baidu.com; get its way is: document.referrer
document.referrer; // "https://www.baidu.com/
note:
1. If the user is typing the URL directly accessed, then this property to an empty string;
2. The value of this attribute always Referer HTTP header information fields of the same, at least one Note that "r".