301重定向是否始终保留引荐来源网址? [英] Does 301 redirect always preserve referrer?

查看:208
本文介绍了301重定向是否始终保留引荐来源网址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道301重定向是否始终保留引荐来源网址.

I want to know whether 301 redirect always preserve referrer.

我制作了一个名为"gotoorig_https.html"的页面,其中包含指向页面"orig_https.asp"的超链接.
"orig_https.asp"将301重定向到显示"document.referrer"的"dest.html".

I make a page called "gotoorig_https.html" which contains a hyperlink to a page "orig_https.asp".
"orig_https.asp" will 301 redirect to "dest.html" which shows the document.referrer.

在这种情况下

http page(gotoorig_https.html) -> orig_https.asp(301 redirect)-> https page (dest.html) <--the referrer preserves  
https page(gotoorig_https.html) -> orig_https.asp(301 redirect)-> https page (dest.html) <--the referrer preserves  

我还制作了一个名为"gotoorig_http.html"的页面,其中包含指向页面"orig_http.asp"的超链接. "orig_http.asp"将301重定向到显示document.referrer的"dest.html".

I also make a page called "gotoorig_http.html" which contains a hyperlink to a page "orig_http.asp". "orig_http.asp" will 301 redirect to "dest.html" which shows the document.referrer.

在这种情况下

http page(gotoorig_http.html) -> orig_http.asp(301 redirect)-> http page (dest.html) <--the referrer preserves  
https page(gotoorig_http.html) -> orig_http.asp(301 redirect)-> http page (dest.html) <--the referrer DOES NOT preserve.

为什么最后一种情况会发生?

Why does the last case happen?

推荐答案

RFC在状态301定义中未指定任何特定于引荐来源的行为,也未在Referer标头定义中指定301特定行为.因此,我不得不说,尽管这种保留引用人的行为是合乎逻辑的,但它并未在RFC中定义,因此您永远无法确定.

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.

这篇关于301重定向是否始终保留引荐来源网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆