Document JavaScript Tutorial

The referrer property contains the URL that was used to reach the current document.
If the URL was typed directly into the browser's location field, this property will be empty.