How to a referrer be the same as the current url

http-referrerurl

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.

Best Answer

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