admin管理员组

文章数量:1405987

document.referrer in javascript is blank from a 302 redirect from http to https using a F5 load balancer in Firefox and Chrome, but shows up in IE. Is there a reason for this or a way around to detect the referrer?

document.referrer in javascript is blank from a 302 redirect from http to https using a F5 load balancer in Firefox and Chrome, but shows up in IE. Is there a reason for this or a way around to detect the referrer?

Share Improve this question asked Jun 28, 2012 at 22:20 Mike FlynnMike Flynn 24.3k59 gold badges197 silver badges369 bronze badges 2
  • 1 Don't rely on REFERER. It was a terrible idea that should never have been perpetuated. If you need to keep track of history, do it explicitly with a URL query parameter. – Pointy Commented Jun 28, 2012 at 22:36
  • Are you going from a page served over https:// to an http:// link which redirects to https:// automatically? – Bruno Commented Jun 29, 2012 at 0:00
Add a ment  | 

1 Answer 1

Reset to default 8

It's a security feature when redirecting/linking cross-protocol sites.

There is never a way to detect the correct referrer, because clients can easily spoof or disable them.

本文标签: javascriptdocumentreferrer is blank in firefox and chrome on SSL redirectStack Overflow