Skip to content
Related Articles

Related Articles

HTTP headers | Referer
  • Last Updated : 22 Nov, 2019
GeeksforGeeks - Summer Carnival Banner

The HTTP Referer header is a request-type header that identifies the address of the previous web page, which is linked to the current web page or resource being requested. The usage of this header increases the risk of privacy and security breaches on a website but it allows websites and web servers to identify where the traffic is coming from. The Referer can not be sent by the browsers if the resource is the local file or data.

Syntax:

Referer: <url>

Directives: The HTTP Referer header accepts a single directive as mentioned above and described below:

  • <url>: This directive is the address(partial or full) of the previous World Wide Web page which was followed by a link to the currently requested page.

Below examples illustrates the HTTP Referer header:

Examples:

  • In this example, geeksforgeeks.org is the address of the previous web page.
    Referer: https://www.geeksforgeeks.org/
  • In this example, google.com is the address of the previous web page.
    Referer: https://www.google.com/

To check the Referer in action go to Inspect Element -> Network check the request header for Referer like below. Referer header is highlighted.

Supported Browsers: The browsers are compatible with HTTP header Referer are listed below:

  • Google Chrome
  • Internet Explorer
  • Microsoft Edge
  • Firefox
  • Opera
  • Safari

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :