Bil*_*lly 27 http-referer redirect http-status-code-301
我想知道301重定向是否始终保留referrer.
我创建了一个名为"gotoorig_https.html"的页面,其中包含指向页面"orig_https.asp"的超链接.
"orig_https.asp"将301重定向到显示document.referrer的"dest.html".
在这种情况下,
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
Run Code Online (Sandbox Code Playgroud)
我还创建了一个名为"gotoorig_http.html"的页面,其中包含指向页面"orig_http.asp"的超链接."orig_http.asp"将301重定向到"dest.html",显示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.
Run Code Online (Sandbox Code Playgroud)
为什么最后一种情况发生?
Mic*_*rny 28
RFC未在状态301定义中指定任何特定于引荐者的行为,也未在Referer头定义中指定特定于301的行为.因此,我不得不说尽管这种引用保留行为是合乎逻辑的,但它并没有在RFC中定义,因此您永远无法确定.
| 归档时间: |
|
| 查看次数: |
20237 次 |
| 最近记录: |