JavaScript » Document » referrer

Syntax:
document.referrer

If a destination document is reached by a user clicking on a Link object in another document (the referrer), this property returns the referring document's URL.