Skip to content
Permalink
Browse files

[giow] (3) I totally broke document.referrer a few weeks ago.

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 c061142689ad75b225024cb94669f2e63d8325f3
Showing with 79 additions and 20 deletions.
  1. +26 −6 complete.html
  2. +26 −6 index
  3. +27 −8 source

<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>

<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>


<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

<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>


<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
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
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>
<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>
32 index

<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>

<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>


<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

<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>


<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
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
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>
<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>

0 comments on commit c061142

Please sign in to comment.
You can’t perform that action at this time.