HTTP referer

From WikiMD's Wellness Encyclopedia

HTTP referer (originally a misspelling of referrer) is an HTTP header field that identifies the address of the webpage (i.e., the URI or IRI) that linked to the resource being requested. By checking the referer, the new webpage can see where the request originated. In the context of the World Wide Web, it is a mechanism to track which webpages link to each other, and it plays a crucial role in analyzing web traffic, enhancing security measures, and personalizing content for users.

Overview[edit | edit source]

The HTTP referer header was introduced in HTTP 1.0. Its purpose is to allow a server to identify where people are visiting from, or more specifically, the last page the user was on (the one where they actually clicked the link). This can be useful for various reasons, such as to track how traffic flows through a website, to protect against Cross-Site Request Forgery (CSRF) attacks by verifying the origin of requests, or to tailor responses based on the referring URL.

Functionality[edit | edit source]

When a user clicks a hyperlink in a web browser, the browser sends a request to the server hosting the target page. This request can include a referer header, which indicates the last page the user was on (the referer). Not all requests include this header; for example, browsers do not send the referer header when navigating from a secure site (HTTPS) to a non-secure site (HTTP) to protect user privacy.

Privacy Concerns and Security[edit | edit source]

The referer header can potentially leak sensitive information through URLs, such as session IDs or other private data. As a result, websites must be cautious about the information included in URLs. Additionally, modern web browsers and the introduction of the Referrer-Policy HTTP header allow websites to control the amount of information that should be included in the referer header to mitigate privacy concerns.

Referrer-Policy[edit | edit source]

The Referrer-Policy header allows a web server to instruct the browser on how to handle referer information. Options include not sending the referer header, sending it only for same-origin requests, or stripping it down to the origin. This flexibility helps balance the needs for privacy and the utility of the referer header.

Applications[edit | edit source]

Beyond security and analytics, the referer header is used in various applications, including:

  • Affiliate marketing: to track the origin of traffic and attribute sales or conversions.
  • Ad serving: to customize advertisements based on the content of the referring page.
  • Website optimization: to understand user navigation paths and improve site architecture.

Limitations and Alternatives[edit | edit source]

While useful, the referer header is not completely reliable. Users or browsers can modify or block the referer for privacy reasons, and some firewalls and proxies strip this information from requests. Alternatives and complements to the referer header, such as tracking pixels, cookies, and other analytics tools, are often used to gather similar information more reliably.

See Also[edit | edit source]

References[edit | edit source]


WikiMD
Navigation: Wellness - Encyclopedia - Health topics - Disease Index‏‎ - Drugs - World Directory - Gray's Anatomy - Keto diet - Recipes

Search WikiMD

Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro / Zepbound) available.
Advertise on WikiMD

WikiMD's Wellness Encyclopedia

Let Food Be Thy Medicine
Medicine Thy Food - Hippocrates

Medical Disclaimer: WikiMD is not a substitute for professional medical advice. The information on WikiMD is provided as an information resource only, may be incorrect, outdated or misleading, and is not to be used or relied on for any diagnostic or treatment purposes. Please consult your health care provider before making any healthcare decisions or for guidance about a specific medical condition. WikiMD expressly disclaims responsibility, and shall have no liability, for any damages, loss, injury, or liability whatsoever suffered as a result of your reliance on the information contained in this site. By visiting this site you agree to the foregoing terms and conditions, which may from time to time be changed or supplemented by WikiMD. If you do not agree to the foregoing terms and conditions, you should not enter or use this site. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.

Contributors: Prab R. Tumpati, MD