Here's the quiz:
Suppose page A displays page B in an iframe. What is the referrer for page B? The answer is simple: page A. Now suppose that B contains a link to page C. Click the link, and the a popup show page C.
What referrer is used for C?
Iframe Quiz!
Moderator: General Moderators
Re: Iframe Quiz!
C's referrer is B because the link was on B. Opening a page in an iframe or popup is similar to opening it in a new full-sized window or tab. Even though the opened page is presented as part of the triggering page, it is still a separate page.
Re: Iframe Quiz!
Okay, FF/Opera/Chrome tell me B, but IE8 says A.
What the hell?
What the hell?
Re: Iframe Quiz!
Internet Explorer 7 says B too.
Re: Iframe Quiz!
I would have to install it; but I'm not going to because I don't want to risk screwing up my system right now.
Try this. If you need a second opinion, maybe someone else with IE8 can run it.
ref.php
a.php
b.php
c.php
Try this. If you need a second opinion, maybe someone else with IE8 can run it.
ref.php
Code: Select all
<?php
if (! function_exists('ref')) {
function ref () {
if (isset ($_SERVER['HTTP_REFERER'])) {
return basename($_SERVER['HTTP_REFERER']);
}
return 'none';
}
}
printf('<pre>Referrer: %s</pre>', ref());Code: Select all
<?php include 'ref.php'; ?>
<iframe src="b.php"></iframe>Code: Select all
<?php include 'ref.php'; ?>
<a href="c.php">c.php</a>Code: Select all
<?php include 'ref.php'; ?>