Skip to content

Commit

Permalink
[] (0) Clarify 'Referer' handling in general. Fix it for window.open(…
Browse files Browse the repository at this point in the history
…) spcifically.

git-svn-id: http://svn.whatwg.org/webapps@3223 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 12, 2009
1 parent 79cb339 commit 4d476dc
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 16 deletions.
32 changes: 24 additions & 8 deletions index
Expand Up @@ -5147,7 +5147,28 @@
redirects, <a href=#concept-js-deref title=concept-js-deref>dereferencing <span title="javascript protocol"><code title="">javascript:</code>
URLs</span></a>, etc).</p>

</li>
<p>For purposes of generating the <i>address of the resource from
which Request-URIs are obtained</i> as required by HTTP for the
<code title=http-referer>Referer</code> (sic) header, the user
agent must use <a href="#the-document's-current-address">the document's current address</a> of the
appropriate <code>Document</code> as given by this list. <a href=#refsHTTP>[HTTP]</a></p>

<dl class=switch><dt>When <a href=#navigate title=navigate>navigating</a></dt>

<dd>The <a href=#active-document>active document</a> of the <a href=#source-browsing-context>source browsing
context</a>.</dd>

<dt>When fetching resources for an element</dt>

<dd>The element's <code>Document</code>.</dd>

<dt>When fetching resources in response to a call to an API</dt>

<dd>The <a href=#active-document>active document</a> of the <a href="#script's-browsing-context" title="script's
browsing context">browsing context</a> of the <a href=#first-script>first
script</a>.</dd>

</dl></li>

<li>

Expand Down Expand Up @@ -7168,11 +7189,6 @@ interface <dfn id=domstringmap-0>DOMStringMap</dfn> {};</pre>
must be set to <a href="#the-document's-address">the document's address</a> when the
<code>Document</code> is created.</span></p>

<p>For purposes of generating the <i>address of the resource from
which Request-URIs are obtained</i> as required by HTTP for the
<code title=http-referer>Referer</code> (sic) header, the user
agent must use <a href="#the-document's-current-address">the document's current address</a>. <a href=#refsHTTP>[HTTP]</a></p>

<p>When a <code>Document</code> is created by a <a href=#concept-script title=concept-script>script</a> using the <code title="">createDocument()</code> API, <a href="#the-document's-address">the document's
address</a> is the same as <a href="#the-document's-address">the document's address</a> of
the <a href=#active-document>active document</a> of the <a href="#script's-browsing-context">script's browsing
Expand Down Expand Up @@ -46447,8 +46463,8 @@ interface <dfn id=window>Window</dfn> {
<a href=#browsing-context>browsing context</a> was just created as part of the
<a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a browsing context given a browsing
context name</a>. The navigation must be done with the <a href="#script's-browsing-context" title="script's browsing context">browsing context</a> of the
<a href=#concept-script title=concept-script>script</a> that invoked the method
as the <a href=#source-browsing-context>source browsing context</a>.</p>
<a href=#first-script>first script</a> as the <a href=#source-browsing-context>source browsing
context</a>.</p>

<p>The method must return the <code><a href=#windowproxy>WindowProxy</a></code> object of the
<a href=#browsing-context>browsing context</a> that was navigated, or null if no
Expand Down
36 changes: 28 additions & 8 deletions source
Expand Up @@ -4817,6 +4817,32 @@
title="javascript protocol"><code title="">javascript:</code>
URLs</span></span>, etc).</p>

<p>For purposes of generating the <i>address of the resource from
which Request-URIs are obtained</i> as required by HTTP for the
<code title="http-referer">Referer</code> (sic) header, the user
agent must use <span>the document's current address</span> of the
appropriate <code>Document</code> as given by this list. <a
href="#refsHTTP">[HTTP]</a></p>

<dl class="switch">

<dt>When <span title="navigate">navigating</span></dt>

<dd>The <span>active document</span> of the <span>source browsing
context</span>.</dd>

<dt>When fetching resources for an element</dt>

<dd>The element's <code>Document</code>.</dd>

<dt>When fetching resources in response to a call to an API</dt>

<dd>The <span>active document</span> of the <span title="script's
browsing context">browsing context</span> of the <span>first
script</span>.</dd>

</dl>

</li>

<li>
Expand Down Expand Up @@ -7231,12 +7257,6 @@ interface <dfn>DOMStringMap</dfn> {};</pre>
must be set to <span>the document's address</span> when the
<code>Document</code> is created.</span></p>

<p>For purposes of generating the <i>address of the resource from
which Request-URIs are obtained</i> as required by HTTP for the
<code title="http-referer">Referer</code> (sic) header, the user
agent must use <span>the document's current address</span>. <a
href="#refsHTTP">[HTTP]</a></p>

<p>When a <code>Document</code> is created by a <span
title="concept-script">script</span> using the <code
title="">createDocument()</code> API, <span>the document's
Expand Down Expand Up @@ -52900,8 +52920,8 @@ interface <dfn>Window</dfn> {
<span>the rules for choosing a browsing context given a browsing
context name</span>. The navigation must be done with the <span
title="script's browsing context">browsing context</span> of the
<span title="concept-script">script</span> that invoked the method
as the <span>source browsing context</span>.</p>
<span>first script</span> as the <span>source browsing
context</span>.</p>

<p>The method must return the <code>WindowProxy</code> object of the
<span>browsing context</span> that was navigated, or null if no
Expand Down

0 comments on commit 4d476dc

Please sign in to comment.