Skip to content

Commit

Permalink
[giow] (3) I totally broke document.referrer a few weeks ago.
Browse files Browse the repository at this point in the history
Affected topics: HTML, Video Text Tracks

git-svn-id: http://svn.whatwg.org/webapps@7762 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Mar 21, 2013
1 parent 610543d commit c061142
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 20 deletions.
32 changes: 26 additions & 6 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 20 March 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 21 March 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -6728,7 +6728,7 @@ <h4 id=processing-model><span class=secno>2.6.2 </span>Processing model</h4>

<li>

<p>Apply the <a href=#url-parser>URL parser</a> to <var title="">referrer</var> and let <var title="">parsed referrer</var> be <a href=#resulting-parsed-url>resulting parsed URL</a>.</p>
<p>Apply the <a href=#url-parser>URL parser</a> to <var title="">referrer</var> and let <var title="">parsed referrer</var> be the <a href=#resulting-parsed-url>resulting parsed URL</a>.</p>

</li>

Expand Down Expand Up @@ -6770,6 +6770,10 @@ <h4 id=processing-model><span class=secno>2.6.2 </span>Processing model</h4>

<p>This is the <i>main step</i>.</p>

<p>If the resource is to be obtained from an <a href=#application-cache>application cache</a>, then use the data
from that <a href=#application-cache>application cache</a>, as if it had been obtained in the manner appropriate
given its <a href=#url>URL</a>.</p>

<p>If the resource is identified by an <a href=#absolute-url>absolute URL</a>, and the resource is to be
obtained using an idempotent action (such as an HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>), and it is already being downloaded
for other reasons (e.g. another invocation of this algorithm), and this request would be
Expand Down Expand Up @@ -66841,12 +66845,13 @@ <h4 id=navigating-across-documents><span class=secno>6.6.1 </span>Navigating acr

<p>Otherwise:</p>

<!--CLEANUP-->
<p>If the new resource is to be fetched using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and there are <a href=#relevant-application-cache title="relevant
application cache">relevant application caches</a> that are identified by a URL with the
<a href=#same-origin>same origin</a> as the URL in question, and that have this URL as one of their entries,
excluding entries marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, and whose
<a href=#concept-appcache-mode title=concept-appcache-mode>mode</a> is <a href=#concept-appcache-mode-fast title=concept-appcache-mode-fast>fast</a>, and the user agent is not in a mode where it
will avoid using <a href=#application-cache title="application cache">application caches</a> then get the resource
will avoid using <a href=#application-cache title="application cache">application caches</a> then <a href=#fetch>fetch</a> the resource
from the <a href=#concept-appcache-selection title=concept-appcache-selection>most appropriate application cache</a> of
those that match.</p>

Expand Down Expand Up @@ -66921,7 +66926,7 @@ <h4 id=navigating-across-documents><span class=secno>6.6.1 </span>Navigating acr

<li>

<p>If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
<p><strong>Fallback for fallback entries</strong>: If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and its URL <a href=#concept-appcache-matches-fallback title=concept-appcache-matches-fallback>matches the fallback namespace</a> of one or more
<a href=#relevant-application-cache title="relevant application cache">relevant application caches</a>, and the <a href=#concept-appcache-selection title=concept-appcache-selection>most appropriate application cache</a> of those that match
does not have an entry in its <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
Expand All @@ -66946,13 +66951,18 @@ <h4 id=navigating-across-documents><span class=secno>6.6.1 </span>Navigating acr
failed, that the page used was a fallback resource, and what the URL of the fallback resource
actually is.</p>

<p class=note>This does not affect the <i>address of the resource from which Request-URIs are
obtained</i>, as used to set <a href="#the-document's-referrer">the document's referrer</a> in the <a href=#create-a-document-object>create a Document
object</a> steps below; they still use the value as computed by the original
<a href=#fetch>fetch</a> algorithm.</p>

</li>

<li>

<p>If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
<!--CLEANUP--><!--swap-->
<p><strong>Fallback in prefer-online mode</strong>: If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and

there are <a href=#relevant-application-cache title="relevant application cache">relevant application caches</a> that are
identified by a URL with the <a href=#same-origin>same origin</a> as the URL in question, and that have this
URL as one of their entries, excluding entries marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, and whose <a href=#concept-appcache-mode title=concept-appcache-mode>mode</a> is <a href=#concept-appcache-mode-prefer-online title=concept-appcache-mode-prefer-online>prefer-online</a>, and the user didn't cancel the
Expand All @@ -66971,6 +66981,11 @@ <h4 id=navigating-across-documents><span class=secno>6.6.1 </span>Navigating acr
The user agent may indicate to the user that the original page load failed, and that the page
used was a previously cached resource.</p>

<p class=note>This does not affect the <i>address of the resource from which Request-URIs are
obtained</i>, as used to set <a href="#the-document's-referrer">the document's referrer</a> in the <a href=#create-a-document-object>create a Document
object</a> steps below; they still use the value as computed by the original
<a href=#fetch>fetch</a> algorithm.</p>

</li>

<li>
Expand Down Expand Up @@ -67086,6 +67101,11 @@ <h4 id=navigating-across-documents><span class=secno>6.6.1 </span>Navigating acr
<code><a href=#document>Document</a></code> instead, and change the <code title=dom-document><a href=#dom-document-0>document</a></code>
attribute of the <code><a href=#window>Window</a></code> object to point to the new <code><a href=#document>Document</a></code>.</p>

<li><p>Set <a href="#the-document's-referrer">the document's referrer</a> to the <i>address of the resource from which
Request-URIs are obtained</i> as determined when the <a href=#fetch>fetch</a> algorithm obtained the
resource, if that algorithm was used and determined such a value; otherwise, set it to the
empty string.</li>

<li><p><a href=#implement-the-sandboxing>Implement the sandboxing</a> for the <code><a href=#document>Document</a></code>.</li>

<li id=fullscreen-logic>
Expand Down
32 changes: 26 additions & 6 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@

<header class=head id=head><p><a class=logo href=http://www.whatwg.org/><img alt=WHATWG height=101 src=/images/logo width=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 20 March 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 21 March 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -6728,7 +6728,7 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<li>

<p>Apply the <a href=#url-parser>URL parser</a> to <var title="">referrer</var> and let <var title="">parsed referrer</var> be <a href=#resulting-parsed-url>resulting parsed URL</a>.</p>
<p>Apply the <a href=#url-parser>URL parser</a> to <var title="">referrer</var> and let <var title="">parsed referrer</var> be the <a href=#resulting-parsed-url>resulting parsed URL</a>.</p>

</li>

Expand Down Expand Up @@ -6770,6 +6770,10 @@ a.setAttribute('href', 'http://example.com/'); // change the content attribute d

<p>This is the <i>main step</i>.</p>

<p>If the resource is to be obtained from an <a href=#application-cache>application cache</a>, then use the data
from that <a href=#application-cache>application cache</a>, as if it had been obtained in the manner appropriate
given its <a href=#url>URL</a>.</p>

<p>If the resource is identified by an <a href=#absolute-url>absolute URL</a>, and the resource is to be
obtained using an idempotent action (such as an HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>), and it is already being downloaded
for other reasons (e.g. another invocation of this algorithm), and this request would be
Expand Down Expand Up @@ -66841,12 +66845,13 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU

<p>Otherwise:</p>

<!--CLEANUP-->
<p>If the new resource is to be fetched using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and there are <a href=#relevant-application-cache title="relevant
application cache">relevant application caches</a> that are identified by a URL with the
<a href=#same-origin>same origin</a> as the URL in question, and that have this URL as one of their entries,
excluding entries marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, and whose
<a href=#concept-appcache-mode title=concept-appcache-mode>mode</a> is <a href=#concept-appcache-mode-fast title=concept-appcache-mode-fast>fast</a>, and the user agent is not in a mode where it
will avoid using <a href=#application-cache title="application cache">application caches</a> then get the resource
will avoid using <a href=#application-cache title="application cache">application caches</a> then <a href=#fetch>fetch</a> the resource
from the <a href=#concept-appcache-selection title=concept-appcache-selection>most appropriate application cache</a> of
those that match.</p>

Expand Down Expand Up @@ -66921,7 +66926,7 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU

<li>

<p>If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
<p><strong>Fallback for fallback entries</strong>: If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and its URL <a href=#concept-appcache-matches-fallback title=concept-appcache-matches-fallback>matches the fallback namespace</a> of one or more
<a href=#relevant-application-cache title="relevant application cache">relevant application caches</a>, and the <a href=#concept-appcache-selection title=concept-appcache-selection>most appropriate application cache</a> of those that match
does not have an entry in its <a href=#concept-appcache-onlinewhitelist title=concept-appcache-onlinewhitelist>online
Expand All @@ -66946,13 +66951,18 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
failed, that the page used was a fallback resource, and what the URL of the fallback resource
actually is.</p>

<p class=note>This does not affect the <i>address of the resource from which Request-URIs are
obtained</i>, as used to set <a href="#the-document's-referrer">the document's referrer</a> in the <a href=#create-a-document-object>create a Document
object</a> steps below; they still use the value as computed by the original
<a href=#fetch>fetch</a> algorithm.</p>

</li>

<li>

<p>If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
<!--CLEANUP--><!--swap-->
<p><strong>Fallback in prefer-online mode</strong>: If the resource was not fetched from an <a href=#application-cache>application cache</a>, and was to be fetched
using HTTP GET <a href=#concept-http-equivalent-get title=concept-http-equivalent-get>or equivalent</a>, and

there are <a href=#relevant-application-cache title="relevant application cache">relevant application caches</a> that are
identified by a URL with the <a href=#same-origin>same origin</a> as the URL in question, and that have this
URL as one of their entries, excluding entries marked as <a href=#concept-appcache-foreign title=concept-appcache-foreign>foreign</a>, and whose <a href=#concept-appcache-mode title=concept-appcache-mode>mode</a> is <a href=#concept-appcache-mode-prefer-online title=concept-appcache-mode-prefer-online>prefer-online</a>, and the user didn't cancel the
Expand All @@ -66971,6 +66981,11 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
The user agent may indicate to the user that the original page load failed, and that the page
used was a previously cached resource.</p>

<p class=note>This does not affect the <i>address of the resource from which Request-URIs are
obtained</i>, as used to set <a href="#the-document's-referrer">the document's referrer</a> in the <a href=#create-a-document-object>create a Document
object</a> steps below; they still use the value as computed by the original
<a href=#fetch>fetch</a> algorithm.</p>

</li>

<li>
Expand Down Expand Up @@ -67086,6 +67101,11 @@ State: &lt;OUTPUT NAME=I&gt;1&lt;/OUTPUT&gt; &lt;INPUT VALUE="Increment" TYPE=BU
<code><a href=#document>Document</a></code> instead, and change the <code title=dom-document><a href=#dom-document-0>document</a></code>
attribute of the <code><a href=#window>Window</a></code> object to point to the new <code><a href=#document>Document</a></code>.</p>

<li><p>Set <a href="#the-document's-referrer">the document's referrer</a> to the <i>address of the resource from which
Request-URIs are obtained</i> as determined when the <a href=#fetch>fetch</a> algorithm obtained the
resource, if that algorithm was used and determined such a value; otherwise, set it to the
empty string.</li>

<li><p><a href=#implement-the-sandboxing>Implement the sandboxing</a> for the <code><a href=#document>Document</a></code>.</li>

<li id=fullscreen-logic>
Expand Down
Loading

0 comments on commit c061142

Please sign in to comment.