The HTTP Header "Referer" is used maily to detect the URL from which a page is loaded.
But there are times when this header is not passed. This also can be spoofed using some plug-ins.
This article has more details on this.
https://isc.sans.edu/forums/diary/When+does+your+browser+send+a+Referer+header+or+not/16433/