views:

217

answers:

1

Hey guys, I'm posting this here because the Doctype community seems to be sleeping in.

If I set up a page like this:

<html><head><meta http-equiv="refresh" content="0;url=http://internic.net/"&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;

Will the browser send referrer info and other metadata when the redirection is performed?

+1  A: 

In testing here on Firefox and IE do not but Chrome does send the referrer (though this is inconsistent as well), regardless of it's it's going to the same domain or not.

Seeing as I can't fine any spec stating what should be the standard behavior, and W3C in general discourages a META redirect, I'm not sure you can ever depend on this being consistent.

Nick Craver
The page you linked to says "The odd thing I found was that IE handles javascript and meta refreshes slightly differently than FireFox or Safari. Internet Explorer will null the REFERER when it hits the target site, while FireFox and Safari will both set the REFERER to the URL with the javascript or meta refresh code on it."Did it change since then?
Waterfox
@Waterfox - I'm testing here on local and on URLs, in each case chrome and Firefox aren't passing a referrer header at all, I have one more test on an external site to run, I'll comment again after it.
Nick Craver
@Waterfox - I tested on a remote domain and chrome *is* passing the referrer, which means it's not consistent like I thought...so you can't really depend on this one way or another it looks like. I *presume* Safari behaves like Chrome in this respect, but I don't have it to test with.
Nick Craver
What is the recommended kind of redirection? In fact, I don't want the referrer to be passed.
Waterfox
@Waterfox - You could direct to a page you have, via POST, etc, then have it redirect where you're going...all the other end will see is your `redirect.whatever` page, so nothing useful...this is a common way of hiding data from advertisers, etc. The *preferred* method would be a 301/302 Http Status Redirect, but these won't hide the referrer.
Nick Craver