W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

Re: [whatwg] Document referrer and script entry point

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 23 Oct 2012 04:36:31 +0000 (UTC)
To: Boris Zbarsky <bzbarsky@MIT.EDU>
cc: Bobby Holley <bobbyholley@gmail.com>, Adam Barth <w3c@adambarth.com>, public-script-coord@w3.org
Message-ID: <Pine.LNX.4.64.1210230404010.2471@ps20323.dreamhostps.com>
On Mon, 22 Oct 2012, Boris Zbarsky wrote:
> It's about both, since they're identical, as far as I can tell.  The 
> text at 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-referrer 
> and at 
> http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#fetch 
> step 2 "navigating" case are basically the same, and there's a Note at 
> the former that says so.

Fair enough. (I should probably change document.referrer to be defined in 
terms of the value computed in the 'fetch' algorithm, so that I only 
have to fix it in one place if it's wrong.)


The question is what should the Referer header be for C in this case?:

   <!DOCTYPE HTML> <!-- A -->
   <iframe src=B></iframe>
    onload = function () {

   <!DOCTYPE HTML> <!-- B -->
    function test() {
      document.getElementsByTagName('iframe')[0].contentWindow.location = 'C';

In that case, the answer is B, because "the browsing context of the script 
that invoked the method" is B's, so that's the source browsing context, so 
in the fetch algorithm /document/ is B, and so we use its address.

Which is what Bobby said. :-)

Sorry for being slow on this thing. I'm fine with changing it.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 23 October 2012 04:36:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:07 UTC