HomeRelated InformationReferrer and Referrer Policies in HTTP Requests
Referrer and Referrer Policies in HTTP Requests

The purpose of setting the referrer is to determine whether to include the original website's URL when redirecting to an external domain. By default, browsers include the URL when redirecting to an external website, so by default, external websites can trace the originating website. However, this can be disabled by setting the referrer.

Close directly

Add code

// No referrer sent for all requests  // Referrer sent for same-origin requests 

default value

Reference documents:https://www.w3.org/TR/2017/CR-referrer-policy-20170126/#referrer-policies

enum ReferrerPolicy { "", "no-referrer", "no-referrer-when-downgrade", "same-origin", "origin", "strict-origin", "origin-when-cross-origin", "strict-origin-when-cross-origin", "unsafe-url" };
  • Empty string
  • no-referrer No referrer is sent for any requests.
  • no-referrer-when-downgrade By default, no referrer is sent when making an HTTPS to HTTP request.
  • same-origin Requests from the same origin will send a referrer.
  • origin It will be sent, but only the protocol and domain information will be sent.
  • strict-origin It will send the referrer, but only the protocol and domain information. Referrers will not be sent for HTTPS to HTTP requests.
  • origin-when-cross-origin Requests from the same origin will send a referrer; requests from different origins will only send the protocol and domain information.
  • strict-origin-when-cross-origin Requests from the same origin will send a referrer; HTTPS to HTTP requests will not send a referrer; otherwise, only the origin information will be sent.
  • unsafe-url Send referrer at any time

Other settings

There are four possible methods:

  • Configure via the Referrer-Policy HTTP header:Referrer-Policy: origin
  • pass<meta>To change the Referrer Policy of an element, simply modify the content named "referrer". <meta name="referrer" content="origin">
  • Give <a>, <area>, <img>, <iframe>, or<link>Setting the referrerpolicy attribute of an element <a href="http://example.com" referrerpolicy="origin">
  • If you need to configure the settings so that referrer information is not displayed, you can also give... <a>, <area>, <link>The element sets the link relationship of rel. <a href="http://example.com" rel="noreferrer">

Notice

  • When set to <meta name="referrer" content="no-referrer"> At that time, statistics from Baidu Analytics, CNZZ, and other sources will become invalid.
  • Generally, backend systems need to be configured. <meta name="referrer" content="no-referrer">To avoid tracing the origin of the product downstream.

Reference documents

Software Applications: Front-end template download; development and design; SEO optimization; offline web browsing. Note: This software is not a hacking program and cannot download backend data!
Disclaimer: This service is for personal study, research, or enjoyment purposes only, and is for non-commercial, non-profit use. Users must comply with copyright laws and related regulations and must not infringe upon the legitimate rights and interests of this website and related rights holders. Any risks arising from the use of this tool are the sole responsibility of the user and are not the responsibility of the software itself.
Copyright © 2019-2026 Xiaofeitu Software. All Rights Reserved. Guangdong ICP Registration No. 19111427-2
Tutorial User Manual Website Special