admin管理员组文章数量:1323524
I've noticed that if a foreign https:
site links to my non-https site, that I don't get anything in the HTTP Referer header at all. I've experienced this with access.log
, but I presume the same happens with JavaScript's document.referrer
, too.
So, if the referrer is https, is there no way to get any information about it? Not even the hostname / domain name? Or is it possible to somehow get at least the domain, with JavaScript?
Also, I presume running my own site with https
isn't going to solve this issue for me, correct?
I've noticed that if a foreign https:
site links to my non-https site, that I don't get anything in the HTTP Referer header at all. I've experienced this with access.log
, but I presume the same happens with JavaScript's document.referrer
, too.
So, if the referrer is https, is there no way to get any information about it? Not even the hostname / domain name? Or is it possible to somehow get at least the domain, with JavaScript?
Also, I presume running my own site with https
isn't going to solve this issue for me, correct?
- check this webmasters.stackexchange./questions/47405/… – user1914292 Commented May 14, 2013 at 19:48
2 Answers
Reset to default 5You should check this answer : Get referrer URL - visitors ing from Paypal (HTTPS)
In case your site uses HTTP (not HTTPS) and the referer uses HTTPS, there is no Referrer being sent!
HTTP RFC - 15.1.3 Encoding Sensitive Information in URI's states:
Clients SHOULD NOT include a Referer header field in a (non-secure) HTTP request if the referring page was transferred with a secure protocol.
So the only way to get the Referrer is to use HTTPS on your site.
To get the document.referrer
, You can use either of the options below:
You Need to convert your HTTP site to HTTPS.
Or you can add the below simple meta tag in your HTTPS site.
<meta name="referrer" content="always">
本文标签: javascriptCan you at least get the domain of the https refererStack Overflow
版权声明:本文标题:javascript - Can you at least get the domain of the https referer? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742132145a2422210.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论