HTTP 引荐来源网址是什么?
在以下情况下,HTTP 引荐来源网址是什么:
- 用户单击网站上的链接,然后到达另一个网站,该网站正在热链接来自第三个网站的图像,图像上的引荐来源网址是什么。
- 用户单击转到另一个网站的链接,该网站使用 META Refresh 将其发送回第一个网站。
- 用户单击转到另一个网站的链接,该网站包含指向第二个网站第二个页面的 iframe,引荐来源网址是原始网站还是第二个网站?
我似乎找不到答案,如果我在这里找不到答案,那么我只会制作页面并进行测试。
What would the HTTP referrer be in the following cases:
- User clicks a link on a website and arrives at a different website that is hot linking an image from a 3rd website, what would the referrer be on the image.
- User clicks a link that goes to a different website that uses META Refresh to send them back to the first website.
- User clicks a link that goes to a different website which contains an iframe to a second page on the second site, is the referrer the original site or the second site?
I cant seem to find an answer, If I cant get an answer here then i'll just make the pages and test it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我懒得尝试解释所有给定的场景,但为了帮助测试,我们可以轻松创建一个 PHP 脚本来返回一张图像,告诉我们引荐来源网址是什么:
如果网站使用 HTTP 重定向进行响应,例如
302 暂时移动
,那么您的浏览器仍会发送带有重定向请求的原始引荐来源网址:请注意,例如在 Mac 上的 Safari 中,按住 Command 键单击(可在新选项卡)并按住 Command-Option 键单击(新窗口) 设置该链接的引荐来源网址,同时从上下文菜单中选择“在新选项卡/窗口中打开链接”(右键单击后) )不。
快乐测试。 ;-)
I am too lazy to try to interpret all given scenarios, but to help test things one can easily created a PHP script to return an image that tells us what the referrer is:
If a web site responds with a HTTP redirect, like
302 Moved Temporarily
, then your browser will still send the original referrer with the redirected request:Please note that, for example in Safari on a Mac, Command-click (to open a link in a new tab) and Command-Option-click (new window) do set the referrer for that link, while choosing "Open Link in New Tab/Window" from the context menu (after a right-click) does not.
Happy testing. ;-)
Referer始终是引用当前资源的文档/资源。因此:
The Referer is always the document/resource that is referring to the current resource. So:
引荐来源网址将是第三个网站。
<块引用>
引荐来源网址始终是 HTTP 请求的主机。
引荐来源网址将是不同的网站。
<块引用>
即使页面使用元刷新,它仍然是一个 HTTP 请求,并且之前的规则适用。
引荐来源网址将是第二个网站。
<块引用>
iframe
请求的处理方式与新浏览器窗口中的请求相同。The referrer would be the third website.
The referrer would be the different website.
The referrer would be the second website.
首先,HTTP Referer 可能是各种隐私感知软件客户端甚至某些网关/代理上可能会变成的任何东西。
让我来尝试一下:
无论浏览器发送请求时当前页面是什么(无论是图像、重定向还是其他),[通常]都会发送到该 URL 下的服务器。要求。 [再次强调,如果没有某种隐私设备更改此 HTTP 标头值和其他 HTTP 标头值]
First off, HTTP Referer may be just about anything which various privacy-aware software client-side or even on some gateway/proxy on the way may turn it to be.
Yet let me take a crack at it:
Whatever the current page is at the time the browser sends a request (be it for an image, a redirection, whatever) is [normally] sent to the server underlying the URL of the request. [again, if no privacy device of sorts change this and other HTTP header values]
猜测,但我非常有信心:
Guesses, but I'm pretty confident: