Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
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 Feb 7 '11 at 19:09
    
Could you clarify what you mean by "session state"? –  jrdioko Feb 7 '11 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 Feb 7 '11 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. –  ultrasawblade Feb 7 '11 at 19:50
    
@ultrasawblade: Question updated. –  jrdioko Feb 7 '11 at 20:03
show 1 more comment

2 Answers

up vote 4 down vote accepted

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...

share|improve this answer
    
Could you give an example of an extension that does this (doesn't just turn of the referrer entirely but sets it to the current page)? –  jrdioko Feb 8 '11 at 0:11
    
addons.mozilla.org/en-US/firefox/addon/refcontrol can do this, iirc. –  Jeremy Sturdivant Feb 8 '11 at 0:14
add comment

I'm experiencing this while accessing my site via a mobile device. I think that the device is making a second request to the same URL to retrieve the favicon. In this case the referrer URL gets set to the current URL when the request is made.

share|improve this answer
    
and what can be done to fix this problem? –  Simon Sheehan Dec 15 '11 at 21:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.