Response.Redirect - Incorrect referrer

I have a application that i use for traffic tracking.

I get a incoming visitor from several source websites and redirect the visitor to the target website using Response.Redirect(url);

The problem is that currently the referer shown to the target website (after i redirect) is of the url of the source website and not my website.

how do i clear/change the referer before using the Response.Redirect?

This is my code of Default.aspx:

public partial class _Default : System.Web.UI.Page 
        protected void Page_Load(object sender, EventArgs e) 
            if (!IsPostBack) 

                catch (System.Threading.ThreadAbortException) { } 



From the ASPX page try one these solutions:

1.. Try adding a meta refresh tag to the header of your aspx page from the codebehind.

Response.AppendHeader("Refresh", "0; url=");

2.. Add Javascript to your page from the codebehind

Page.RegisterStartupScript("myScript", "<script language=JavaScript>window.location = "";</script>");

The referer is controlled by the browser, so there's probably not a whole lot you can do to change its mind. There is a hack you can put to use, but it is just that.

Have you tried doing a Server.Transfer instead?

Like 48klocs mentioned. There just isn't a good way to do this. Been down the road too and it sucks.

Some clients and anti virus software will remove or even fill it with junk.

Need Your Help

how can i use other application preference


how can i access other application preference screen implementation from my application by changing in the preference screen layout using intent or something. is it possible to get the implementati...

How do I hide iAd banners when no ads are being served?

iphone cocoa-touch iad

Anyone able to offer a little help on this? I just received feedback from Apple advising my app could not be accepted because it contained adbanners that were still visible when no ads were being s...