Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[] (0) Make pushState() affect Referer:, since otherwise analytics re…
…sults would depend on when the user reloads the source page.

git-svn-id: http://svn.whatwg.org/webapps@3002 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Apr 27, 2009
1 parent d309fce commit d92adfd
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 32 deletions.
38 changes: 22 additions & 16 deletions index
Expand Up @@ -5116,7 +5116,7 @@
</dl></li>

</ol><p class=note>The above algorithm is a willful violation of the
HTTP specification. <a href=#refsRFC2616>[RFC2616]</a></p>
HTTP specification. <a href=#refsHTTP>[HTTP]</a></p>


<h4 id=content-type-sniffing:-web-pages><span class=secno>2.7.2 </span>Content-Type sniffing: Web pages</h4>
Expand Down Expand Up @@ -6769,6 +6769,11 @@ 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 @@ -6915,10 +6920,10 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {

<dt><var title="">document</var> . <code title=dom-document-referrer><a href=#dom-document-referrer>referrer</a></code></dt>
<dd>
<p>Returns <a href="#the-document's-address" title="the document's address">the address</a>
of the <code>Document</code> from which the user navigated to this
one, unless it was blocked or there was no such document, in which
case it returns the empty string.</p>
<p>Returns <a href="#the-document's-current-address" title="the document's current address">the
address</a> of the <code>Document</code> from which the user
navigated to this one, unless it was blocked or there was no such
document, in which case it returns the empty string.</p>
<p>The <code title=link-type-noreferrer>noreferrer</code> link
type can be used to block the referrer.</p>
</dd>
Expand All @@ -6929,10 +6934,10 @@ interface <dfn id=htmldocument>HTMLDocument</dfn> {
attribute must return <a href="#the-document's-address">the document's address</a>.</p>

<p>The <dfn id=dom-document-referrer title=dom-document-referrer><code>referrer</code></dfn> attribute
must return either the <a href="#the-document's-address" title="the document's
address">address</a> of the <a href=#active-document>active document</a> of the
<a href=#source-browsing-context>source browsing context</a> at the time the navigation was
started (that is, the page which <a href=#navigate title=navigate>navigated</a> the <a href=#browsing-context>browsing context</a>
must return either the <a href="#the-document's-current-address" title="the document's current
address">current address</a> of the <a href=#active-document>active document</a>
of the <a href=#source-browsing-context>source browsing context</a> <em>at the time the
navigation was started</em> (that is, the page which <a href=#navigate title=navigate>navigated</a> the <a href=#browsing-context>browsing context</a>
to the current document), or the empty string if there is no such
originating page, or if the UA has been configured not to report
referrers in this case, or if the navigation was initiated for a
Expand Down Expand Up @@ -10092,7 +10097,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
the order that they were given in the HTTP entity header. (URIs in
these headers are to be processed and resolved according to the
rules given in HTTP; the rules of <em>this</em> specification don't
apply.) <a href=#refsRFC2616>[RFC2616]</a> <a href=#refsRFC2068>[RFC2068]</a></p>
apply.) <a href=#refsHTTP>[HTTP]</a> <a href=#refsRFC2068>[RFC2068]</a></p>

<p>The DOM attributes <dfn id=dom-link-href title=dom-link-href><code>href</code></dfn>, <dfn id=dom-link-rel title=dom-link-rel><code>rel</code></dfn>, <dfn id=dom-link-media title=dom-link-media><code>media</code></dfn>, <dfn id=dom-link-hreflang title=dom-link-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-link-type title=dom-link-type><code>type</code></dfn>, and <dfn id=dom-link-sizes title=dom-link-sizes><code>sizes</code></dfn> each must
<a href=#reflect>reflect</a> the respective content attributes of the same
Expand Down Expand Up @@ -10463,7 +10468,7 @@ people expect to have work and what is necessary.

<p class=note>This pragma is not exactly equivalent to the HTTP
<code>Content-Language</code> header, for instance it only
supports one language. <a href=#refsRFC2616>[RFC2616]</a></p>
supports one language. <a href=#refsHTTP>[HTTP]</a></p>

</dd>

Expand Down Expand Up @@ -46305,11 +46310,12 @@ user reload must be equivalent to .reload()
encrypted connection</dt>

<dd>The request must include a <code title="">Referer</code> (sic)
HTTP header [sic] with, as its value, the <a href="#the-document's-address" title="the
document's address">address</a> of the document containing the
hyperlink, a <code title=http-ping-from>Ping-From</code> HTTP
header with the same value, and a <code title=http-ping-to>Ping-To</code> HTTP header with, as its value,
the address of the target of the hyperlink.</dd>
HTTP header [sic] with, as its value, the <a href="#the-document's-current-address" title="the
document's current address">current address</a> of the document
containing the hyperlink, a <code title=http-ping-from>Ping-From</code> HTTP header with the same
value, and a <code title=http-ping-to>Ping-To</code> HTTP header
with, as its value, the address of the target of the
hyperlink.</dd>

<dt>Otherwise, the origins are different and the document
containing the hyperlink being audited was retrieved over an
Expand Down
39 changes: 23 additions & 16 deletions source
Expand Up @@ -4845,7 +4845,7 @@
</ol>

<p class="note">The above algorithm is a willful violation of the
HTTP specification. <a href="#refsRFC2616">[RFC2616]</a></p>
HTTP specification. <a href="#refsHTTP">[HTTP]</a></p>


<h4>Content-Type sniffing: Web pages</h4>
Expand Down Expand Up @@ -6846,6 +6846,12 @@ 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 @@ -7002,10 +7008,10 @@ interface <dfn>HTMLDocument</dfn> {

<dt><var title="">document</var> . <code title="dom-document-referrer">referrer</code></dt>
<dd>
<p>Returns <span title="the document's address">the address</span>
of the <code>Document</code> from which the user navigated to this
one, unless it was blocked or there was no such document, in which
case it returns the empty string.</p>
<p>Returns <span title="the document's current address">the
address</span> of the <code>Document</code> from which the user
navigated to this one, unless it was blocked or there was no such
document, in which case it returns the empty string.</p>
<p>The <code title="link-type-noreferrer">noreferrer</code> link
type can be used to block the referrer.</p>
</dd>
Expand All @@ -7019,10 +7025,10 @@ interface <dfn>HTMLDocument</dfn> {

<p>The <dfn
title="dom-document-referrer"><code>referrer</code></dfn> attribute
must return either the <span title="the document's
address">address</span> of the <span>active document</span> of the
<span>source browsing context</span> at the time the navigation was
started (that is, the page which <span
must return either the <span title="the document's current
address">current address</span> of the <span>active document</span>
of the <span>source browsing context</span> <em>at the time the
navigation was started</em> (that is, the page which <span
title="navigate">navigated</span> the <span>browsing context</span>
to the current document), or the empty string if there is no such
originating page, or if the UA has been configured not to report
Expand Down Expand Up @@ -10606,7 +10612,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
the order that they were given in the HTTP entity header. (URIs in
these headers are to be processed and resolved according to the
rules given in HTTP; the rules of <em>this</em> specification don't
apply.) <a href="#refsRFC2616">[RFC2616]</a> <a
apply.) <a href="#refsHTTP">[HTTP]</a> <a
href="#refsRFC2068">[RFC2068]</a></p>

<p>The DOM attributes <dfn
Expand Down Expand Up @@ -11043,7 +11049,7 @@ people expect to have work and what is necessary.

<p class="note">This pragma is not exactly equivalent to the HTTP
<code>Content-Language</code> header, for instance it only
supports one language. <a href="#refsRFC2616">[RFC2616]</a></p>
supports one language. <a href="#refsHTTP">[HTTP]</a></p>

</dd>

Expand Down Expand Up @@ -54090,11 +54096,12 @@ interface <dfn>SQLTransactionSync</dfn> {

<dd>The request must include a <code title="">Referer</code> (sic)
HTTP header [sic] with, as its value, the <span title="the
document's address">address</span> of the document containing the
hyperlink, a <code title="http-ping-from">Ping-From</code> HTTP
header with the same value, and a <code
title="http-ping-to">Ping-To</code> HTTP header with, as its value,
the address of the target of the hyperlink.</dd>
document's current address">current address</span> of the document
containing the hyperlink, a <code
title="http-ping-from">Ping-From</code> HTTP header with the same
value, and a <code title="http-ping-to">Ping-To</code> HTTP header
with, as its value, the address of the target of the
hyperlink.</dd>

<dt>Otherwise, the origins are different and the document
containing the hyperlink being audited was retrieved over an
Expand Down

0 comments on commit d92adfd

Please sign in to comment.