Compare UK Credit Cards - Debt Consolidation - Debt Consolidation - Credit Card - Wordpress magazine themes

PDA

View Full Version : Redirecting to test Test the Referrer HTTP Header


Cholt
Aug 22nd 2006, 5:43 am
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

Darrin
Aug 22nd 2006, 9:08 am
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?

Cholt
Aug 22nd 2006, 11:29 am
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.