Simply enough, the referrer property of the document object, identifies the referrer page URL.
If the value of document.referrer is blank ("") , then it shows user loaded up your page directly by typing its URL into the browser address field.
Just be notified that the value of document.referrer is blank if you test an HTML page locally in your machine.
if (document.referrer != "") {
document.writeln("Ref page: " + document.referrer);
}
else
{
document.writeln("Page loaded up from fresh.");
}
No comments:
Post a Comment