front pagerelevant informationReferrer and Referrer Policies in HTTP request meta tags
Referrer and Referrer Policies in HTTP request meta tags

The purpose of setting referrer is to determine whether to carry the original site URL to the external website when jumping to the external domain name. The default browser carries the URL to the external website, so the default external website can be tracked to the incoming website, but it can be turned off through settings (reference source).

Directly close

Add code

//所有请求不发送 <meta name="referrer" content="no-referrer"> //同源的请求,会发送referrer <meta name="referrer" content="same-origin">

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 All requests do not send referrer
  • no-referrer-when-downgrade By default, referrer will not be sent when making a request from https to http.
  • same-origin For requests from the same origin, a referrer will be sent
  • origin Will send, but only send protocol and domain name information
  • strict-origin Yes, but only the protocol and domain name information will be sent. Referrer will not be sent when the request is from https to http.
  • origin-when-cross-origin For requests from the same source, a referrer will be sent. For requests from different sources, only the protocol and domain name information will be sent.
  • strict-origin-when-cross-origin For requests from the same source, a referrer will be sent. For requests from https to http, a referrer will not be sent. At other times, only the source information will be sent.
  • unsafe-url Send referrer at all times

other settings

There are four methods:

  • Via the Referrer-Policy HTTP header:Referrer-Policy: origin
  • pass<meta>The element changes the Referrer Policy and directly modifies the content named referrer <meta name="referrer" content="origin">
  • Give <a>, <area>, <img>, <iframe>, or<link>Set the referrerpolicy attribute on the element <a href="http://example.com" referrerpolicy="origin">
  • If you need to set the referrer information not to be displayed, you can also give <a>, <area>, <link>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 this time, statistics such as Baidu Statistics and cnzz will become invalid.
  • Generally, the backend system needs to be set up <meta name="referrer" content="no-referrer">, avoiding downstream tracking.

Reference Documentation

Software application: front-end template download; development and design; SEO optimization; offline web browsing. Note: This software is not a hacking program and cannot download background data!
Disclaimer: The services are used for personal learning, research or appreciation, as well as other non-commercial or non-profit purposes, but at the same time should comply with the provisions of copyright law and other relevant laws, and must not infringe the legitimate rights of this website and related rights holders. The risks arising from the use of this site's tools have nothing to do with this software.
Copyright © 2019-2024 Rabbit Software All Rights Reserved Guangdong ICP No. 19111427-2
Tutorial Information User Manual Website topics