Does 301 redirect always preserve referrer?

后端 未结 3 693
忘掉有多难
忘掉有多难 2020-12-09 08:23

I want to know whether 301 redirect always preserve referrer.

I make a page called \"gotoorig_https.html\" which contains a hyperlink to a page \"orig_https.asp\".

相关标签:
3条回答
  • 2020-12-09 08:37

    Over https the browsers are not sending REFERRERS. This is in the RFC.

    0 讨论(0)
  • 2020-12-09 08:38

    When going between HTTP and HTTPS the HTTP spec says that a referer header should NOT be sent (see 15.1.3 in RFC2616). The spec doesn't say what should happen between HTTPS pages however.

    Interestingly firefox defaults to ignoring the spec in this case, but can be made to conform by setting the network.http.sendSecureXSiteReferrer configuration setting.

    0 讨论(0)
  • 2020-12-09 08:49

    RFC doesn't specify any referrer-specific behavior in status 301 definition, nor 301-specific behavior in Referer header definition. Thus, I have to say that although this referrer-preserving behavior is logical, it is not defined in RFC and thus you can never be sure.

    0 讨论(0)
提交回复
热议问题