Difference between single and meta redirect.

Status
Not open for further replies.

kblessinggr

PedoBeard
Sep 15, 2008
5,723
80
0
G.R., Michigan
www.kbeezie.com
I've heard people say that if you want to scrub (erase) the referrer you need to do a double-meta redirect. But I haven't seen this to be the case.

So I did a lil test.

A redirect via PHP header (301), passes the referer along from the page that calls it.
Link -> php calling header() (meta.html) -> Destination > Referer = Link

A single meta refresh sets itself as the referer url.
Link -> Page with meta (meta.html) -> Destination > Referer = meta.html

A double does the same thing.
Link -> Meta refresh (meta.html) -> Meta refresh (meta2.html) -> Destination > Referer = meta2.html

So, out of curiosity seeing as even if you do it once or twice the results being the same. Is there really a point in performing a meta refresh twice?

And in what cases would you wish to scrub the referer?

Are there other redirect methods out there that have a practical benefit?
 


A single meta refresh sets itself as the referer url.
Link -> Page with meta (meta.html) -> Destination > Referer = meta.html


A double does the same thing.
Link -> Meta refresh (meta.html) -> Meta refresh (meta2.html) -> Destination > Referer = meta2.html

You must be using Opera. With IE7 and FF3 on windows(for me anyway) any meta refresh doesn't send a referer. Opera however does and I'm not sure about safari. Anyway, by the time the client gets to the destination if you double redirect then the referer is whatever you make it, that is, whatever you make meta2.html. Destination doesn't know about meta1.html only meta2.html. meta2.html can be on a different domain. Get it?
 
Nope, using Safari 4.

I guess that makes sense if you had a need to make the referer domain different than the originating redirect routine. I'm guessing in a way, that way there's nothing indexing wise to directly match the source to the second meta, likewise nothing to connect the destination to the first meta.
 
This is the one I use (courtesy of vsloathe):

Code:
<?php
$url = $_GET['url'];
if(!empty($_SERVER['HTTP_REFERER'])){
	echo '<meta http-equiv="refresh" content="0;'.$_SERVER['PHP_SELF'].'?url='.$url.'">';
}else{
	header('Location: '.$url, TRUE, 301);
}
?>

If you use that then there is no possible way it will send them to the affiliate link with a referer, in the odd occasion that it does happen (browser anomalies, referer spoofing etc).
 
Status
Not open for further replies.