标签:
HTTP协议规定:
Clients SHOULD NOT include a Referer header field in a (non-secure) HTTP request if the referring page was transferred with a secure protocol.
<input id="referrer" type="hidden" name="referrer" />
<script type="text/javascript">
document.getElementById("referrer").value = window.location.href
</script>
string urlReferrer = "";
if (Request.UrlReferrer == null)
{
urlReferrer = Request["referrer"];
- }
else
{
urlReferrer = Request.UrlReferrer.AbsoluteUri;
}
https和http 调用过程中请求头 referrer 获取不到的问题
标签:
原文地址:http://www.cnblogs.com/tangruixin/p/5969305.html