HTTP - Referer (Referrer)


The referer (or referrer) identifies the URL of the page where a link was clicked (ie where the request originated). It identifies the address of the web page that linked to the resource.

The referer may also be known as the request's initiator.

Its value is given in the referer header field written in a http request (referer is a misspelling of referrer. See HTTP referer note-1)

A referrer source is either:


The client, generally a browser would insert the following header in the http request


How to get the Referer in Javascript

  • In a iframe
var referrer = parent.document.referrer;
// not in a iframe document.referrer;
  • Print



The referrer policy modifies the algorithm used to populate the Referer header when fetching subresources, prefetching, or performing navigations.

See HTTP - Referrer-Policy Header

Powered by ComboStrap