简体   繁体   English

http_referrer可以合法为空白吗

[英]Can http_referrer be blank legitimately

I know that files that get called directly have blank http_referrer. 我知道直接调用的文件具有空白的http_referrer。 Can I assume that in all other cases, there should be an http_referrer? 我可以假定在所有其他情况下都应该有一个http_referrer吗?

No, you can't assume that. 不,你不能这么认为。 Many browsers (and browser plugins) allow the REFERER to be switched off. 许多浏览器(和浏览器插件)都允许关闭REFERER。 It is not good practice to rely on it at all, except possibly to provide some secondary functionality. 完全依靠它不是一个好习惯,除非可能提供一些辅助功能。

I know that files that get called directly have blank http_referrer 我知道直接被调用的文件具有空白的http_referrer

Nope. 不。 It is not blank, there is no referrer at all 它不是空白,根本没有引荐来源

Can I assume that in all other cases, there should be an http_referrer? 我可以假定在所有其他情况下都应该有一个http_referrer吗?

No. You should assume that there will be a referrer from time to time. 否。您应该假设会不时有推荐人。

No, you can't. 不,你不能。
Some overcautious software can strip it or substitute with something irrelevant, like Field is blocked by Outpost 一些过分谨慎的软件可以剥离它或用不相关的东西代替,例如Field is blocked by Outpost

Yes and no. 是的,没有。

  • Some browsers allow you to turn it off. 某些浏览器允许您将其关闭。
  • However you can refuse to serve files to them if you wish. 但是,如果愿意,您可以拒绝向他们提供文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM