Short URL: http://html5.org/r/1799
Index: source
===================================================================
--- source (revision 1798)
+++ source (revision 1799)
@@ -3870,6 +3870,21 @@
+ <h3>Fetching resources</h3>
+
+ <p class="big-issue">replace all instances of the word 'fetch' or
+ 'download' with a reference to this section, and put something here
+ that talks about caching, that redirects to the offline storage
+ stuff when appropriate, that defines that before fetching a URL you
+ have to resolve the URL, so that every case of fetching doesn't have
+ to independently say to resolve the URL, etc; "once fetched, a
+ resource might have to have its type determined", pointing to the
+ next section but also explicitly saying that it's up to the part of
+ the spec doing the fetching to determine how the type is
+ established</p>
+
+
+
<h3 id="content-type-sniffing">Determining the type of a resource</h3>
<p class="warning">It is imperative that the rules in this section
@@ -4586,6 +4601,9 @@
+
+
+
<h2 id="dom">Semantics and structure of HTML documents</h2>
<h3 id="semantics-intro">Introduction</h3>
@@ -13180,14 +13198,11 @@
- <!-- XXXURL XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \(URI\|IRI\|URL\) -->
-
<p>The <code title="attr-img-src">src</code> attribute, on setting,
must cause the user agent to immediately begin to download the
- specified resource<!-- XXX xref what fetching means, XXXURL how to
- resolve URLs in attributes (including those not in the DOM) -->,
- unless the user agent cannot support images, or its support for
- images has been disabled.</p>
+ specified resource<!-- XXX xref what fetching means -->, unless the
+ user agent cannot support images, or its support for images has been
+ disabled.</p>
<p>The download of the image must <span>delay the <code
title="event-load">load</code> event</span>.</p>
@@ -13401,15 +13416,15 @@
<p>The <code>iframe</code> element introduces a new nested
<span>browsing context</span>.</p>
- <p>The <dfn title="attr-iframe-src"><code>src</code></dfn>
- attribute, if present, must be a <span>valid URL</span> of a page that
- the nested <span>browsing context</span> is to contain. When the
- browsing context is created, if the attribute is present, the user
- agent must <span>navigate</span> this browsing context to the given
- URI<!-- XXXURL resolve relative URLs -->, with <span>replacement
- enabled</span>, and with the <code>iframe</code> element's
- document's <span>browsing context</span> as the <span>source
- browsing context</span>. If the user <span
+ <p>The <dfn title="attr-iframe-src"><code>src</code></dfn> attribute
+ gives the address of a page that the nested <span>browsing
+ context</span> is to contain. The attribute, if present, must be a
+ <span>valid URL</span>. When the browsing context is created, if the
+ attribute is present, the user agent must <span>navigate</span> the
+ element's browsing context to the given <span>URL</span>, with
+ <span>replacement enabled</span>, and with the <code>iframe</code>
+ element's document's <span>browsing context</span> as the
+ <span>source browsing context</span>. If the user <span
title="navigate">navigates</span> away from this page, the
<code>iframe</code>'s corresponding <code>Window</code> object will
reference new <code>Document</code> objects, but the <code
@@ -13417,10 +13432,9 @@
<p>Whenever the <code title="attr-iframe-src">src</code> attribute
is set, the nested <span>browsing context</span> must be <span
- title="navigate">navigated</span> to the given URI<!-- XXXURL
- resolve relative URLs -->, with the <code>iframe</code> element's
- document's <span>browsing context</span> as the <span>source
- browsing context</span>.</p>
+ title="navigate">navigated</span> to the given <span>URL</span>,
+ with the <code>iframe</code> element's document's <span>browsing
+ context</span> as the <span>source browsing context</span>.</p>
<p>If the <code title="attr-iframe-src">src</code> attribute is not
set when the element is created, the browsing context will remain at
@@ -13985,6 +13999,8 @@
attribute, if present, specifies the address of the resource. If
present, the attribute must be a <span>valid URL</span>.</p>
+ <!-- XXXURL XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \(URI\|IRI\|URL\) -->
+
<p>The <dfn title="attr-object-type"><code>type</code></dfn>
attribute, if present, specifies the type of the resource. If
present, the attribute must be a valid MIME type, optionally with
@@ -31921,9 +31937,9 @@
<h4>Navigating across documents</h4>
<p>Certain actions cause the <span>browsing context</span> to
- <dfn>navigate</dfn>. Navigation always involves a <dfn>source
- browsing context</dfn>, which is the browsing context which was
- responsible for starting the navigation.</p>
+ <dfn>navigate</dfn> to a new resource. Navigation always involves
+ <dfn>source browsing context</dfn>, which is the browsing context
+ which was responsible for starting the navigation.</p>
<p class="example">For example, <span title="following
hyperlinks">following a hyperlink</span>, <span title="">form
@@ -31932,11 +31948,12 @@
title="dom-location-assign">location.assign()</code> methods can all
cause a browsing context to navigate.</p>
- <p>A user agent may also provide various ways for the user to
- explicitly cause a browsing context to navigate.</p>
+ <p>A user agent may provide various ways for the user to explicitly
+ cause a browsing context to navigate, in addition to those defined
+ in this specification.</p>
- <p>When a browsing context is navigated, the user agent must run the
- following steps:</p>
+ <p>When a browsing context is navigated to a new resource, the user
+ agent must run the following steps:</p>
<ol>
@@ -31947,13 +31964,13 @@
browsing contexts</span> of the <span>browsing context</span> being
navigated, and the <span>source browsing context</span> has its
<span>sandboxed navigation browsing context flag</span> set, then
- abort these steps. The user agent may offer to open the specified
+ abort these steps. The user agent may offer to open the new
resource in a new <span>top-level browsing context</span> or in the
<span>top-level browsing context</span> of the <span>source
browsing context</span>, at the user's option, in which case the
user agent must <span>navigate</span> that designated
- <span>top-level browsing context</span> to the specified resource
- as if the user had requested it independently.</p></li>
+ <span>top-level browsing context</span> to the new resource as if
+ the user had requested it independently.</p></li>
<li id="seamlessLinks"><p>If the <span>source browsing
context</span> is the same as the <span>browsing context</span>
@@ -31965,14 +31982,24 @@
that was going to be <span title="navigate">navigated</span>
instead.</p></li>
- <li><p>Cancel any preexisting attempt to navigate the browsing
- context.</p></li>
+ <li><p>Cancel any preexisting attempt to navigate the
+ <span>browsing context</span>.</p></li>
- <li><p>If the new resource is the same as the current resource, but
- a fragment identifier has been specified, changed, or removed, then
- <span title="navigate-fragid">navigate to that fragment
- identifier</span> and abort these steps.</p></li>
+ <li><span title="resolve a url">Resolve</span> the <span>URL</span>
+ of the new resource. If that fails, abort these steps.</li>
+ <li id="navigate-fragid-step"><p><i>Fragment identifiers</i>: If
+ the <span>absolute URL</span> of the new resource is the same as
+ the <span title="the document's
+ address">address</span><!--XXXDOCURL--> of the <span>active
+ document</span> of the <span>browsing context</span> being
+ navigated, ignoring any <span
+ title="url-fragment"><fragment></span> components of those
+ <span title="URL">URLs</span>, and the new resource is to be
+ fetched using HTTP GET or equivalent, then <span
+ title="navigate-fragid">navigate to that fragment identifier</span>
+ and abort these steps.</p></li>
+
<li><p>If the new resource is to be handled by displaying some sort
of inline content, e.g. an error message because the specified
scheme is not one of the supported protocols, or an inline prompt
@@ -32004,12 +32031,13 @@
cache</span> of those that match.</p>
<!-- XXXURL JSURI issue -->
- <p>Otherwise, start fetching the specified resource in the
- appropriate manner (e.g. performing an HTTP GET or POST operation,
- or reading the file from disk, or executing script in the case of
- a <span title="javascript protocol"><code
+ <p>Otherwise, start fetching<!-- XXX xref --> the new resource in
+ the appropriate manner (e.g. performing an HTTP GET or POST
+ operation, or reading the file from disk, or executing script in
+ the case of a <span title="javascript protocol"><code
title="">javascript:</code> URI</span>). If this results in a
- redirect, return to step 2 with the new resource.</p>
+ redirect, return to <a href="navigate-fragid-step">the step
+ labeled "fragment identifiers"</a> with the new resource.</p>
<p class="example">For example, imagine an HTML page with an
associated application cache displaying an image and a form, where
@@ -32158,10 +32186,10 @@
</li>
- <li id="navigate-non-Document"><p>If, given <var
- title="">type</var>, the new resource is to be handled by
- displaying some sort of inline content, e.g. a native rendering of
- the content, an error message because the specified type is not
+ <li id="navigate-non-Document"><p><i>Non-document content</i>: If,
+ given <var title="">type</var>, the new resource is to be handled
+ by displaying some sort of inline content, e.g. a native rendering
+ of the content, an error message because the specified type is not
supported, or an inline prompt to allow the user to select <span
title="dom-navigator-registerContentHandler">a registered
handler</span> for the given type, then <span
@@ -32338,8 +32366,9 @@
e.g. determining that the content is actually a syndication feed and
passing it to a feed handler. If such processing is to take place,
abort the steps in this section, and jump to <a
- href="#navigate-non-Document">step 10</a> in the
- <span>navigate</span> steps above.</p>
+ href="#navigate-non-Document">the next step</a> (labeled
+ "non-document content") in the <span>navigate</span> steps
+ above.</p>
<p>Otherwise, then, with the newly created <code>Document</code>,
the user agents must <span>update the session history with the new