I am too lazy to try to interpret all given scenarios, but to help you test things I've created a PHP script to return an image that tells us what the referrer is:
<?php
header("Content-type: image/png");
header("Cache-control: no-cache");
header("Pragma: no-cache");
header("Expires: -1");
$s = "Referrer: " . $_SERVER['HTTP_REFERER'];
$im = @imagecreate(500, 13)
or die("Cannot Initialize new GD image stream");
$black = imagecolorallocate($im, 0, 0, 0);
imagecolortransparent($im, $black);
$red = imagecolorallocate($im, 255, 0, 0);
imagestring($im, 3, 0, 0, $s, $red);
imagepng($im);
imagedestroy($im);
?>
For this very page:
See the same image at Site 3, and hot-linked and iframe'd on JS Bin for Site 2.
(To ensure the image is not cached when simultaneously hot-linked and iframe'd in the very same page, some dummy GET parameters have been used.)
If a web site responds with a HTTP redirect, like 302 Moved Temporarily
, then your browser will still send the original referrer with the redirected request:
<?php
header("Location: http://[..]/referrer-to-img/referrer.php?redirected");
?>
Like here:
Please note that, for example in Safari on a Mac, Command-click (to open a link in a new tab) and Command-Option-click (new window) do set the referrer for that link, while choosing "Open Link in New Tab/Window" from the context menu (after a right-click) does not.
Happy testing. ;-)