[html5] r7762 - [giow] (3) I totally broke document.referrer a few weeks ago. Affected topics: H [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Mar 21 11:22:08 PDT 2013


Author: ianh
Date: 2013-03-21 11:22:07 -0700 (Thu, 21 Mar 2013)
New Revision: 7762

Modified:
   complete.html
   index
   source
Log:
[giow] (3) I totally broke document.referrer a few weeks ago.
Affected topics: HTML, Video Text Tracks

Modified: complete.html
===================================================================
--- complete.html	2013-03-20 21:56:02 UTC (rev 7761)
+++ complete.html	2013-03-21 18:22:07 UTC (rev 7762)
@@ -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 — Last Updated 20 March 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — 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>
@@ -6728,7 +6728,7 @@
 
    <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>
 
@@ -6770,6 +6770,10 @@
 
     <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
@@ -66841,12 +66845,13 @@
 
     <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>
 
@@ -66921,7 +66926,7 @@
 
    <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
@@ -66946,13 +66951,18 @@
     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
@@ -66971,6 +66981,11 @@
     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>
@@ -67086,6 +67101,11 @@
      <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>

Modified: index
===================================================================
--- index	2013-03-20 21:56:02 UTC (rev 7761)
+++ index	2013-03-21 18:22:07 UTC (rev 7762)
@@ -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 — Last Updated 20 March 2013</h2>
+    <h2 class="no-num no-toc">Living Standard — 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>
@@ -6728,7 +6728,7 @@
 
    <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>
 
@@ -6770,6 +6770,10 @@
 
     <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
@@ -66841,12 +66845,13 @@
 
     <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>
 
@@ -66921,7 +66926,7 @@
 
    <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
@@ -66946,13 +66951,18 @@
     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
@@ -66971,6 +66981,11 @@
     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>
@@ -67086,6 +67101,11 @@
      <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>

Modified: source
===================================================================
--- source	2013-03-20 21:56:02 UTC (rev 7761)
+++ source	2013-03-21 18:22:07 UTC (rev 7762)
@@ -6193,7 +6193,7 @@
    <li>
 
     <p>Apply the <span>URL parser</span> to <var title="">referrer</var> and let <var
-    title="">parsed referrer</var> be <span>resulting parsed URL</span>.</p>
+    title="">parsed referrer</var> be the <span>resulting parsed URL</span>.</p>
 
    </li>
 
@@ -6236,6 +6236,10 @@
 
     <p>This is the <i>main step</i>.</p>
 
+    <p>If the resource is to be obtained from an <span>application cache</span>, then use the data
+    from that <span>application cache</span>, as if it had been obtained in the manner appropriate
+    given its <span>URL</span>.</p>
+
     <p>If the resource is identified by an <span>absolute URL</span>, and the resource is to be
     obtained using an idempotent action (such as an HTTP GET <span
     title="concept-http-equivalent-get">or equivalent</span>), and it is already being downloaded
@@ -34369,8 +34373,7 @@
 
   </div>
 
-<!--END complete-->
-
+<!--END complete--><!--END dev-html-->
 <!--START webvtt-->
 
   <!-- v2 feature requests:
@@ -38678,7 +38681,7 @@
 <!--END webvtt-->
 
 
-<!--START complete-->
+<!--START complete--><!--START dev-html-->
 
 <!--TOPIC:Video and Audio-->
   <h5>User interface</h5>
@@ -79473,6 +79476,7 @@
 
     <p>Otherwise:</p>
 
+<!--CLEANUP-->
     <p>If the new resource is to be fetched using HTTP GET <span
     title="concept-http-equivalent-get">or equivalent</span>, and there are <span title="relevant
     application cache">relevant application caches</span> that are identified by a URL with the
@@ -79480,7 +79484,7 @@
     excluding entries marked as <span title="concept-appcache-foreign">foreign</span>, and whose
     <span title="concept-appcache-mode">mode</span> is <span
     title="concept-appcache-mode-fast">fast</span>, and the user agent is not in a mode where it
-    will avoid using <span title="application cache">application caches</span> then get the resource
+    will avoid using <span title="application cache">application caches</span> then <span>fetch</span> the resource
     from the <span title="concept-appcache-selection">most appropriate application cache</span> of
     those that match.</p>
 
@@ -79560,7 +79564,7 @@
 
    <li>
 
-    <p>If the resource was not fetched from an <span>application cache</span>, and was to be fetched
+    <p><strong>Fallback for fallback entries</strong>: If the resource was not fetched from an <span>application cache</span>, and was to be fetched
     using HTTP GET <span title="concept-http-equivalent-get">or equivalent</span>, and its URL <span
     title="concept-appcache-matches-fallback">matches the fallback namespace</span> of one or more
     <span title="relevant application cache">relevant application caches</span>, and the <span
@@ -79588,13 +79592,18 @@
     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 <span>the document's referrer</span> in the <span>create a Document
+    object</span> steps below; they still use the value as computed by the original
+    <span>fetch</span> algorithm.</p>
+
    </li>
 
    <li>
 
-    <p>If the resource was not fetched from an <span>application cache</span>, and was to be fetched
+<!--CLEANUP--><!--swap-->
+    <p><strong>Fallback in prefer-online mode</strong>: If the resource was not fetched from an <span>application cache</span>, and was to be fetched
     using HTTP GET <span title="concept-http-equivalent-get">or equivalent</span>, and
-
     there are <span title="relevant application cache">relevant application caches</span> that are
     identified by a URL with the <span>same origin</span> as the URL in question, and that have this
     URL as one of their entries, excluding entries marked as <span
@@ -79617,6 +79626,11 @@
     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 <span>the document's referrer</span> in the <span>create a Document
+    object</span> steps below; they still use the value as computed by the original
+    <span>fetch</span> algorithm.</p>
+
    </li>
 
    <li>
@@ -79746,6 +79760,11 @@
      <code>Document</code> instead, and change the <code title="dom-document">document</code>
      attribute of the <code>Window</code> object to point to the new <code>Document</code>.</p>
 
+     <li><p>Set <span>the document's referrer</span> to the <i>address of the resource from which
+     Request-URIs are obtained</i> as determined when the <span>fetch</span> algorithm obtained the
+     resource, if that algorithm was used and determined such a value; otherwise, set it to the
+     empty string.</p></li>
+
      <li><p><span>Implement the sandboxing</span> for the <code>Document</code>.</p></li>
 
      <li id="fullscreen-logic">




More information about the Commit-Watchers mailing list