I have a web application that is testing the referrer HTTP header to perform some logic. I need to test this logic outside of the environment where this application is going to be used so I wrote a simple web page that has javascript that redirects the user to the web application hoping that the referrer header would be set. However, I have found that it is not set and I have tried a number of the methods of redirecting to try to get it to be set. Is there a way to redirect using javascript such that the website being called will have the referrer header set? Thanks, Chris
I can't think of one. Can you grab the referrer URL and tack in onto you the URL you are going to as a parameter?
I solved my problem in a non-javascript way. I just put an anchor tag on my test page and click it. The HTTP request now comes into the web application with the referrer header set correctly.