referrer

Value: String. Read-Only

Compatibility: WinIE3+, MacIE3+, NN2+, Moz+, Safari+

When a link from one document leads to another, the second document can, under JavaScript control, reveal the URL of the document containing the link. The document.referrer property contains a string of that URL. This feature can be a useful tool for customizing the content of pages based on the previous location the user was visiting within your site. A referrer contains a value only when the user reaches the current page through a link. Any other method of navigation (such as through the history, bookmarks, or by manually entering a URL) sets this property to an empty string.

The document.referrer property usually returns an empty string unless the files are retrieved from a web server.

0 0

Post a comment

  • Receive news updates via email from this site