4

Under what circumstances can a visit to a url have a referrer that is the same url as the one being visited?

Edit: To clarify why I'm asking, I have seen this happen multiple times on a production website and I can't reproduce it. There are no forms that submit to the same page and there are no links to the same page. I'm just trying to brainstorm how this could occur to see how to debug this.

Edit 2: It's been a while, but I believe it turned out to be a form that redisplayed the current page with error messages on error. Those page loads had the referrer sent to the current page.

6
  • 1
    Off the top of my head, from a session state or a form that directs to itself, or someone clicking on the "Contact Us" link when they're already on that page? Just some thoughts.
    – user3463
    Commented Feb 7, 2011 at 19:09
  • Could you clarify what you mean by "session state"?
    – jrdioko
    Commented Feb 7, 2011 at 19:20
  • 3
    Also, the client can send whatever they want as Referrer. You cannot trust it to be accurate. I could write a browser or extension that ALWAYS sends the current URL as the Referrer URL.
    – coneslayer
    Commented Feb 7, 2011 at 19:36
  • Perhaps he is asking what valid reason a referrer URL would be the same as a current one, in order to evaluate whether or not to block such requests.
    – LawrenceC
    Commented Feb 7, 2011 at 19:50
  • @ultrasawblade: Question updated.
    – jrdioko
    Commented Feb 7, 2011 at 20:03

1 Answer 1

5

This is done by a good number of "privacy enhancing" browser extensions, avoiding problems with offsite referrers, without completely disabling sending the referrer. It could also happen due to any number of browser bugs. I seem to recall a bug involving the referrer being set to the current page when a page was refreshed...

3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .