How can I determine if the document.referrer is from my own site?
问题 Each time a page is requested I get the referrer of the page it came from. I need to track just referrer from other sites, I don't want to track going from one page to another within my site. How can I do that? 回答1: document.referrer.indexOf(location.protocol + "//" + location.host) === 0; 回答2: Originally posted at JavaScript - Am I the Referrer? When someone comes to our website for the first time, we store the referrer in a cookie. This way, if they download our demo, we can get the