Skip to Content

Referer vs Referrer

Posted on

If you visit a website from another website (ex: Click a link from Google search result page), a referer attribute will be added to your request header.

However, when I try to get this referer from chrome console, I typed document.referer, but nothing happened. document.referrer brings me result =)) Why?

Based on wiki page, it’s just a misspelling mistake =))

The HTTP referer (a misspelling of referrer[1]) is an optional HTTP header field that identifies the address of the webpage (i.e., the URI or IRI) which is linked to the resource being requested. By checking the referrer, the new webpage can see where the request originated.

References:

comments powered by Disqus