[html5] r6318 - [giow] (0) New feature: <a download='filename'>.

whatwg at whatwg.org whatwg at whatwg.org
Fri Jul 22 00:01:42 PDT 2011


Author: ianh
Date: 2011-07-22 00:01:41 -0700 (Fri, 22 Jul 2011)
New Revision: 6318

Modified:
   complete.html
   index
   source
Log:
[giow] (0) New feature: <a download='filename'>.

Modified: complete.html
===================================================================
--- complete.html	2011-07-20 22:28:31 UTC (rev 6317)
+++ complete.html	2011-07-22 07:01:41 UTC (rev 6318)
@@ -239,7 +239,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>Web Applications 1.0</h1>
-    <h2 class="no-num no-toc">Living Standard — Last Updated 20 July 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 22 July 2011</h2>
    </hgroup><dl><dt>Multiple-page version:</dt>
     <dd><a href=http://www.whatwg.org/specs/web-apps/current-work/complete/>http://www.whatwg.org/specs/web-apps/current-work/complete/</a></dd>
     <dt>One-page version:</dt>
@@ -774,31 +774,32 @@
     <ol>
      <li><a href=#introduction-4><span class=secno>4.12.1 </span>Introduction</a></li>
      <li><a href=#links-created-by-a-and-area-elements><span class=secno>4.12.2 </span>Links created by <code>a</code> and <code>area</code> elements</a></li>
-     <li><a href=#following-hyperlinks-0><span class=secno>4.12.3 </span>Following hyperlinks</a>
+     <li><a href=#following-hyperlinks-0><span class=secno>4.12.3 </span>Following hyperlinks</a></li>
+     <li><a href=#downloading-resources><span class=secno>4.12.4 </span>Downloading resources</a>
       <ol>
-       <li><a href=#hyperlink-auditing><span class=secno>4.12.3.1 </span>Hyperlink auditing</a></ol></li>
-     <li><a href=#linkTypes><span class=secno>4.12.4 </span>Link types</a>
+       <li><a href=#hyperlink-auditing><span class=secno>4.12.4.1 </span>Hyperlink auditing</a></ol></li>
+     <li><a href=#linkTypes><span class=secno>4.12.5 </span>Link types</a>
       <ol>
-       <li><a href=#rel-alternate><span class=secno>4.12.4.1 </span>Link type "<code>alternate</code>"</a></li>
-       <li><a href=#link-type-author><span class=secno>4.12.4.2 </span>Link type "<code>author</code>"</a></li>
-       <li><a href=#link-type-bookmark><span class=secno>4.12.4.3 </span>Link type "<code>bookmark</code>"</a></li>
-       <li><a href=#link-type-external><span class=secno>4.12.4.4 </span>Link type "<code>external</code>"</a></li>
-       <li><a href=#link-type-help><span class=secno>4.12.4.5 </span>Link type "<code>help</code>"</a></li>
-       <li><a href=#rel-icon><span class=secno>4.12.4.6 </span>Link type "<code>icon</code>"</a></li>
-       <li><a href=#link-type-license><span class=secno>4.12.4.7 </span>Link type "<code>license</code>"</a></li>
-       <li><a href=#link-type-nofollow><span class=secno>4.12.4.8 </span>Link type "<code>nofollow</code>"</a></li>
-       <li><a href=#link-type-noreferrer><span class=secno>4.12.4.9 </span>Link type "<code>noreferrer</code>"</a></li>
-       <li><a href=#link-type-pingback><span class=secno>4.12.4.10 </span>Link type "<code>pingback</code>"</a></li>
-       <li><a href=#link-type-prefetch><span class=secno>4.12.4.11 </span>Link type "<code>prefetch</code>"</a></li>
-       <li><a href=#link-type-search><span class=secno>4.12.4.12 </span>Link type "<code>search</code>"</a></li>
-       <li><a href=#link-type-sidebar><span class=secno>4.12.4.13 </span>Link type "<code>sidebar</code>"</a></li>
-       <li><a href=#link-type-stylesheet><span class=secno>4.12.4.14 </span>Link type "<code>stylesheet</code>"</a></li>
-       <li><a href=#link-type-tag><span class=secno>4.12.4.15 </span>Link type "<code>tag</code>"</a></li>
-       <li><a href=#sequential-link-types><span class=secno>4.12.4.16 </span>Sequential link types</a>
+       <li><a href=#rel-alternate><span class=secno>4.12.5.1 </span>Link type "<code>alternate</code>"</a></li>
+       <li><a href=#link-type-author><span class=secno>4.12.5.2 </span>Link type "<code>author</code>"</a></li>
+       <li><a href=#link-type-bookmark><span class=secno>4.12.5.3 </span>Link type "<code>bookmark</code>"</a></li>
+       <li><a href=#link-type-external><span class=secno>4.12.5.4 </span>Link type "<code>external</code>"</a></li>
+       <li><a href=#link-type-help><span class=secno>4.12.5.5 </span>Link type "<code>help</code>"</a></li>
+       <li><a href=#rel-icon><span class=secno>4.12.5.6 </span>Link type "<code>icon</code>"</a></li>
+       <li><a href=#link-type-license><span class=secno>4.12.5.7 </span>Link type "<code>license</code>"</a></li>
+       <li><a href=#link-type-nofollow><span class=secno>4.12.5.8 </span>Link type "<code>nofollow</code>"</a></li>
+       <li><a href=#link-type-noreferrer><span class=secno>4.12.5.9 </span>Link type "<code>noreferrer</code>"</a></li>
+       <li><a href=#link-type-pingback><span class=secno>4.12.5.10 </span>Link type "<code>pingback</code>"</a></li>
+       <li><a href=#link-type-prefetch><span class=secno>4.12.5.11 </span>Link type "<code>prefetch</code>"</a></li>
+       <li><a href=#link-type-search><span class=secno>4.12.5.12 </span>Link type "<code>search</code>"</a></li>
+       <li><a href=#link-type-sidebar><span class=secno>4.12.5.13 </span>Link type "<code>sidebar</code>"</a></li>
+       <li><a href=#link-type-stylesheet><span class=secno>4.12.5.14 </span>Link type "<code>stylesheet</code>"</a></li>
+       <li><a href=#link-type-tag><span class=secno>4.12.5.15 </span>Link type "<code>tag</code>"</a></li>
+       <li><a href=#sequential-link-types><span class=secno>4.12.5.16 </span>Sequential link types</a>
         <ol>
-         <li><a href=#link-type-next><span class=secno>4.12.4.16.1 </span>Link type "<code>next</code>"</a></li>
-         <li><a href=#link-type-prev><span class=secno>4.12.4.16.2 </span>Link type "<code>prev</code>"</a></ol></li>
-       <li><a href=#other-link-types><span class=secno>4.12.4.17 </span>Other link types</a></ol></ol></li>
+         <li><a href=#link-type-next><span class=secno>4.12.5.16.1 </span>Link type "<code>next</code>"</a></li>
+         <li><a href=#link-type-prev><span class=secno>4.12.5.16.2 </span>Link type "<code>prev</code>"</a></ol></li>
+       <li><a href=#other-link-types><span class=secno>4.12.5.17 </span>Other link types</a></ol></ol></li>
    <li><a href=#common-idioms-without-dedicated-elements><span class=secno>4.13 </span>Common idioms without dedicated elements</a>
     <ol>
      <li><a href=#the-main-part-of-the-content><span class=secno>4.13.1 </span>The main part of the content</a></li>
@@ -1522,7 +1523,7 @@
   specifications and are not currently available anywhere else:</p>
 
   <ul><li>The <code><a href=#peerconnection>PeerConnection</a></code> API and related video-conferencing features.</li> <!--PEERCONNECTION-->
-   <li>The <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute and related <a href=#hyperlink-auditing>hyperlink auditing</a> features.</li> <!--PING-->
+   <li>New hyperlink features: the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute to make download links and the <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute for <a href=#hyperlink-auditing>hyperlink auditing</a>.</li> <!--DOWNLOAD--><!--PING-->
    <li>The <a href=#webvtt>WebVTT</a> format and some <a href=#text-track>text track</a> API features.</li> <!--TTVTT-->
    <li>Rules for <a href=#atom>converting HTML to Atom</a>.</li> <!--MD-->
    <li>The <code title=dom-document-cssElementMap><a href=#dom-document-csselementmap>cssElementMap</a></code> feature for defining <span title="CSS element reference identifier">CSS element reference identifiers</span>.</li> <!--CSSREF-->
@@ -19920,9 +19921,10 @@
    <dd><a href=#global-attributes>Global attributes</a></dd>
    <dd><code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code></dd>
    <dd><code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code></dd>
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+   <dd><code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code></dd>
    <dd><code title=attr-hyperlink-ping><a href=#ping>ping</a></code></dd>
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
    <dd><code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code></dd>
    <dd><code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code></dd>
    <dd><code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code></dd>
@@ -19932,9 +19934,10 @@
 <pre class=idl>interface <dfn id=htmlanchorelement>HTMLAnchorElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
   stringifier attribute DOMString <a href=#dom-a-href title=dom-a-href>href</a>;
            attribute DOMString <a href=#dom-a-target title=dom-a-target>target</a>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+           attribute DOMString <a href=#dom-a-download title=dom-a-download>download</a>;
            attribute DOMString <a href=#dom-a-ping title=dom-a-ping>ping</a>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
            attribute DOMString <a href=#dom-a-rel title=dom-a-rel>rel</a>;
   readonly attribute <a href=#domtokenlist>DOMTokenList</a> <a href=#dom-a-rellist title=dom-a-relList>relList</a>;
            attribute DOMString <a href=#dom-a-media title=dom-a-media>media</a>;
@@ -19968,9 +19971,10 @@
   otherwise have been placed, if it had been relevant.</p>
 
   <p>The <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+  <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>,
   <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
   <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>, <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>, <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>, and <code title=attr-hyperlink-type><a href=#attr-hyperlink-type>type</a></code> attributes must be omitted
   if the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute is
   not present.</p>
@@ -19991,13 +19995,18 @@
 
   <div class=impl>
 
-  <p>The <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>, <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>
-<!--PING-->
-  and <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>
-<!--PING-->
-  attributes affect what
-  happens when users <a href=#following-hyperlinks title="following hyperlinks">follow
-  hyperlinks</a> created using the <code><a href=#the-a-element>a</a></code> element.  The
+  <p>The <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>,
+  <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>,
+<!--DOWNLOAD--><!--PING-->
+  <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>, and
+  <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>
+<!--DOWNLOAD--><!--PING-->
+  attributes affect what happens when users <a href=#following-hyperlinks title="following
+  hyperlinks">follow hyperlinks</a>
+<!--DOWNLOAD-->
+  or <a href=#downloading-hyperlinks title="downloading hyperlinks">download hyperlinks</a>
+<!--DOWNLOAD-->
+  created using the <code><a href=#the-a-element>a</a></code> element.  The
   <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>, <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>, <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>, and <code title=attr-hyperlink-type><a href=#attr-hyperlink-type>type</a></code> attributes may be used to
   indicate to the user the likely nature of the target resource before
   the user follows the link.</p>
@@ -20009,7 +20018,10 @@
   <ol><li><p>If the <code title=event-click><a href=#event-click>click</a></code> event in
    question is not <a href=#concept-events-trusted title=concept-events-trusted>trusted</a>
    (i.e. a <code title=dom-click><a href=#dom-click>click()</a></code> method call was the
-   reason for the event being dispatched), and the <code><a href=#the-a-element>a</a></code>
+   reason for the event being dispatched), and either the <code><a href=#the-a-element>a</a></code>
+<!--DOWNLOAD-->
+   element has a <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute or the
+<!--DOWNLOAD-->
    element's <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>
    attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a
    browsing context given a browsing context name</a>, using the
@@ -20044,10 +20056,17 @@
     </ol></li>
 
    <li><p>Finally, the user agent must <a href=#following-hyperlinks title="following
-   hyperlinks">follow the hyperlink</a> created by the
-   <code><a href=#the-a-element>a</a></code> element. If the steps above defined a <var><a href=#hyperlink-suffix>hyperlink
-   suffix</a></var>, then take that into account when following the
-   hyperlink.</li>
+   hyperlinks">follow the hyperlink</a>
+<!--DOWNLOAD-->
+   or <a href=#downloading-hyperlinks title="downloading hyperlinks">download the hyperlink</a>
+<!--DOWNLOAD-->
+   created by the <code><a href=#the-a-element>a</a></code> element, as determined by
+<!--DOWNLOAD-->
+   the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute and
+<!--DOWNLOAD-->
+   any expressed user preference. If the steps above defined a
+   <var><a href=#hyperlink-suffix>hyperlink suffix</a></var>, then take that into account when
+   following or downloading the hyperlink.</li>
 
   </ol></div>
 
@@ -20061,10 +20080,12 @@
 
   </dl><div class=impl>
 
-  <p>The IDL attributes <dfn id=dom-a-href title=dom-a-href><code>href</code></dfn>,
-<!--PING-->
+  <p>The IDL attributes
+  <dfn id=dom-a-href title=dom-a-href><code>href</code></dfn>,
+<!--DOWNLOAD--><!--PING-->
+  <dfn id=dom-a-download title=dom-a-download><code>download</code></dfn>,
   <dfn id=dom-a-ping title=dom-a-ping><code>ping</code></dfn>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
   <dfn id=dom-a-target title=dom-a-target><code>target</code></dfn>, <dfn id=dom-a-rel title=dom-a-rel><code>rel</code></dfn>, <dfn id=dom-a-media title=dom-a-media><code>media</code></dfn>, <dfn id=dom-a-hreflang title=dom-a-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-a-type title=dom-a-type><code>type</code></dfn>, must
   <a href=#reflect>reflect</a> the respective content attributes of the same
   name.</p>
@@ -38344,9 +38365,10 @@
    <dd><code title=attr-area-shape><a href=#attr-area-shape>shape</a></code></dd>
    <dd><code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code></dd>
    <dd><code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code></dd>
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+   <dd><code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code></dd>
    <dd><code title=attr-hyperlink-ping><a href=#ping>ping</a></code></dd>
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
    <dd><code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code></dd>
    <dd><code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code></dd>
    <dd><code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code></dd>
@@ -38359,9 +38381,10 @@
            attribute DOMString <a href=#dom-area-shape title=dom-area-shape>shape</a>;
   stringifier attribute DOMString <a href=#dom-area-href title=dom-area-href>href</a>;
            attribute DOMString <a href=#dom-area-target title=dom-area-target>target</a>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+           attribute DOMString <a href=#dom-area-download title=dom-area-download>download</a>;
            attribute DOMString <a href=#dom-area-ping title=dom-area-ping>ping</a>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
            attribute DOMString <a href=#dom-area-rel title=dom-area-rel>rel</a>;
   readonly attribute <a href=#domtokenlist>DOMTokenList</a> <a href=#dom-area-rellist title=dom-area-relList>relList</a>;
            attribute DOMString <a href=#dom-area-media title=dom-area-media>media</a>;
@@ -38481,15 +38504,20 @@
   <div class=impl>
 
   <p>When user agents allow users to <a href=#following-hyperlinks title="following
-  hyperlinks">follow hyperlinks</a> created using the
-  <code><a href=#the-area-element>area</a></code> element, as described in the next section, the
+  hyperlinks">follow hyperlinks</a>
+<!--DOWNLOAD-->
+  or <a href=#downloading-hyperlinks title="downloading hyperlinks">download hyperlinks</a>
+<!--DOWNLOAD-->
+  created using the <code><a href=#the-area-element>area</a></code> element, as described in the
+  next section, the
   <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>,
-  <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>
-<!--PING-->
-  and <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>
-<!--PING-->
-  attributes decide how the
-  link is followed. The <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>,
+  <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>,
+<!--DOWNLOAD--><!--PING-->
+  <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>, and
+  <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>
+<!--DOWNLOAD--><!--PING-->
+  attributes decide how the link is followed.
+  The <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>,
   <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>, <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>, and <code title=attr-hyperlink-type><a href=#attr-hyperlink-type>type</a></code> attributes may be used to
   indicate to the user the likely nature of the target resource before
   the user follows the link.</p>
@@ -38497,9 +38525,10 @@
   </div>
 
   <p>The <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+  <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>,
   <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
   <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>, <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>, <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>, and <code title=attr-hyperlink-type><a href=#attr-hyperlink-type>type</a></code> attributes must be omitted
   if the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute is
   not present.</p>
@@ -38513,6 +38542,9 @@
    question is not <a href=#concept-events-trusted title=concept-events-trusted>trusted</a>
    (i.e. a <code title=dom-click><a href=#dom-click>click()</a></code> method call was the
    reason for the event being dispatched), and the <code><a href=#the-area-element>area</a></code>
+<!--DOWNLOAD-->
+   element has a <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute or the
+<!--DOWNLOAD-->
    element's <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>
    attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a
    browsing context given a browsing context name</a>, using the
@@ -38522,14 +38554,22 @@
    <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort these
    steps.</li>
 
-   <li>Otherwise, the user agent must <a href=#following-hyperlinks title="following
-   hyperlinks">follow the hyperlink</a> created by the
-   <code><a href=#the-area-element>area</a></code> element, if any.</li>
+   <li><p>Otherwise, the user agent must <a href=#following-hyperlinks title="following
+   hyperlinks">follow the hyperlink</a>
+<!--DOWNLOAD-->
+   or <a href=#downloading-hyperlinks title="downloading hyperlinks">download the hyperlink</a>
+<!--DOWNLOAD-->
+   created by the <code><a href=#the-area-element>area</a></code> element, if any, and as determined by
+<!--DOWNLOAD-->
+   the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute and
+<!--DOWNLOAD-->
+   any expressed user preference.</li>
 
   </ol><p>The IDL attributes <dfn id=dom-area-alt title=dom-area-alt><code>alt</code></dfn>, <dfn id=dom-area-coords title=dom-area-coords><code>coords</code></dfn>, <dfn id=dom-area-href title=dom-area-href><code>href</code></dfn>, <dfn id=dom-area-target title=dom-area-target><code>target</code></dfn>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+  <dfn id=dom-area-download title=dom-area-download><code>download</code></dfn>,
   <dfn id=dom-area-ping title=dom-area-ping><code>ping</code></dfn>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
   <dfn id=dom-area-rel title=dom-area-rel><code>rel</code></dfn>, <dfn id=dom-area-media title=dom-area-media><code>media</code></dfn>, <dfn id=dom-area-hreflang title=dom-area-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-area-type title=dom-area-type><code>type</code></dfn>, each must
   <a href=#reflect>reflect</a> the respective content attributes of the same
   name.</p>
@@ -54211,6 +54251,37 @@
   context</a> that will be used. <span class=impl>User agents use
   this name when <a href=#following-hyperlinks>following hyperlinks</a>.</span></p>
 
+<!--DOWNLOAD-->
+  <p>When an <code><a href=#the-a-element>a</a></code> or <code><a href=#the-area-element>area</a></code> element's
+  <a href=#activation-behavior>activation behavior</a> is invoked, the user agent may
+  allow the user to indicate a preference regarding whether the
+  hyperlink is to be used for <a href=#navigate title=navigate>navigation</a>
+  or whether the resource it specifies is to be downloaded.</p>
+
+  <p>In the absence of a user preference, the default should be
+  navigation if the element has no <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute, and
+  should be to download the specified resource if it does.</p>
+
+  <p>Whether determined by the user's preferences or via the presence
+  or absence of the attribute, if the decision is to use the hyperlink
+  for <a href=#navigate title=navigate>navigation</a> then the user agent
+  must <a href=#following-hyperlinks title="following hyperlinks">follow the hyperlink</a>,
+  and if the decision is to use the hyperlink to download a resource,
+  the user agent must <a href=#downloading-hyperlinks title="downloading hyperlinks">download
+  the hyperlink</a>. These terms are defined in subsequent sections
+  below.</p>
+
+  <p>The <dfn id=attr-hyperlink-download title=attr-hyperlink-download><code>download</code></dfn>
+  attribute, if present, indicates that the author intends the
+  hyperlink to be used for downloading a resource. The attribute may
+  have a value; the value, if any, specifies the default filename that
+  the author recommends for use in labeling the resource in a local
+  file system. There are no restrictions on allowed values, but
+  authors are cautioned that most file systems have limitations with
+  regard to what punctuation is supported in file names, and user
+  agents are likely to adjust file names accordingly.</p>
+<!--DOWNLOAD-->
+
 <!--PING-->
   <p>The <dfn id=ping title=attr-hyperlink-ping><code>ping</code></dfn> attribute, if
   present, gives the URLs of the resources that are interested in
@@ -54322,10 +54393,246 @@
   </div>
 
 
+<!--DOWNLOAD-->
+
+  <h4 id=downloading-resources><span class=secno>4.12.4 </span>Downloading resources</h4>
+
+  <p>In some cases, resources are intended for later use rather than
+  immediate viewing. To indicate that a resource is intended to be
+  downloaded for use later, rather than immediately used, the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute can be
+  specified on the <code><a href=#the-a-element>a</a></code> or <code><a href=#the-area-element>area</a></code> element that
+  creates the <a href=#hyperlink>hyperlink</a> to that resource.</p>
+
+  <p>The attribute can furthermore be given a value, to specify the
+  filename that user agents are to use when storing the resource in a
+  file system. This value can be overridden by the <code title=http-content-disposition>Content-Disposition</code> HTTP
+  header's <code title="">filename</code> parameter. <a href=#refsRFC2183>[RFC2183]</a></p>
+
+  <p>In cross-origin situations, the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute has to be
+  combined with the <code title=http-content-disposition>Content-Disposition</code> HTTP
+  header, specifically with the <code title="">attachment</code>
+  disposition type, to avoid the user being warned of possibly
+  nefarious activity. (This is to protect users from being made to
+  download sensitive personal or confidential information without
+  their full understanding.)</p>
+
+  <div class=impl>
+
+  <hr><p>When a user <dfn id=downloading-hyperlinks title="downloading hyperlinks">downloads a
+  hyperlink</dfn> created by an element, the user agent must run the
+  following steps:</p>
+
+  <ol><li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the
+   <a href=#url>URL</a> given by the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute of that element,
+   relative to that element.</li>
+
+   <li><p>If <a href=#resolve-a-url title="resolve a url">resolving</a> the
+   <a href=#url>URL</a> fails, the user agent may report the error to the
+   user in a user-agent-specific manner, may
+   <a href=#navigate>navigate</a><!--DONAV download error--> to an error page
+   to report the error, or may ignore the error and do nothing. In
+   either case, the user agent must abort these steps.</p>
+
+   <li><p>Otherwise, let <var title="">URL</var> be the resulting
+   <a href=#absolute-url>absolute URL</a>.</li>
+
+   <li><p>In the case of server-side image maps, append the
+   <var><a href=#hyperlink-suffix>hyperlink suffix</a></var> to <var title="">URL</var>.</li>
+
+   <li><p>Return to whatever algorithm invoked these steps and continue
+   these steps asynchronously.</li>
+
+   <li><p><a href=#fetch>Fetch</a> <var title="">URL</var> and handle the
+   resulting resource <a href=#as-a-download>as a download</a>.</li> <!--
+   http-origin privacy sensitive -->
+
+  </ol><p>When a user agent is to handle a resource obtained from a
+  <a href=#fetch>fetch</a> algorithm <dfn id=as-a-download>as a download</dfn>, it should
+  provide the user with a way to save the resource for later use, if a
+  resource is successfully obtained; or otherwise should report any
+  problems downloading the file to the user.</p>
+
+  <p>If the user agent needs a file name for a resource being handled
+  <a href=#as-a-download>as a download</a>, it should select one using the following
+  algorithm.</p>
+
+  <p class=warning>This algorithm is intended to mitigate security
+  dangers involved in downloading files from untrusted sites, and user
+  agents are strongly recommended to follow it.</p> <!-- but it's
+  optional, since it's not really an interoperability issue -->
+
+  <ol><li><p>Let <var title="">filename</var> be the void value.</li>
+
+   <li><p>If the resource has a <code title=http-content-disposition>Content-Disposition</code> header,      <!-- Content-Disposition: attachment; filename="" is always honoured, even cross-origin -->
+   that header specifies the <code title="">attachment</code>
+   disposition type, and the header includes a <code title="">filename</code> parameter, then let <var title="">filename</var> have that value, and jump to the step
+   labeled "sanitize" below. <a href=#refsRFC2183>[RFC2183]</a></li>
+
+   <li><p>Let <var title="">resource origin</var> be the
+   <a href=#origin>origin</a> of the resource being downloaded.</li>
+
+   <li><p>Let <var title="">interface origin</var> be the
+   <a href=#origin>origin</a> of the <code><a href=#document>Document</a></code> in which the <a href=#downloading-hyperlinks title="downloading hyperlinks">download</a> or
+   <a href=#navigate>navigate</a> action resulting in the download was
+   initiated, if any.</li>
+
+   <li><p>If there is no <var title="">interface origin</var>, then
+   let <var title="">trusted operation</var> be true. Otherwise, let
+   <var title="">trusted operation</var> be true if <var title="">resource origin</var> is the <a href=#same-origin>same origin</a> as
+   <var title="">interface origin</var>, and false otherwise.</li>
+
+   <li><p>If <var title="">trusted operation</var> is true and the          <!-- Content-Disposition: *; filename="" overrides download="" for same-origin -->
+   resource has a <code title=http-content-disposition>Content-Disposition</code> header
+   and that header includes a <code title="">filename</code>
+   parameter, then let <var title="">filename</var> have that value,
+   and jump to the step labeled "sanitize" below. <a href=#refsRFC2183>[RFC2183]</a></li>
+
+   <li><p>If the download was not initiated from a
+   <a href=#hyperlink>hyperlink</a> created by an <code><a href=#the-a-element>a</a></code> or
+   <code><a href=#the-area-element>area</a></code> element, or if the element of the
+   <a href=#hyperlink>hyperlink</a> from which it was initiated did not have a
+   <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute
+   when the download was initiated, or if there was such an attribute
+   but its value when the download was initiated was the empty string,
+   then jump to the step labeled <i>no proposed filename</i>.</li>
+
+   <li><p>Let <var title="">proposed filename</var> have the value of
+   the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute
+   of the element of the <a href=#hyperlink>hyperlink</a> that initiated the
+   download at the time the download was initiated.</li>
+
+   <li><p>If <var title="">trusted operation</var> is true, let <var title="">filename</var> have the value of <var title="">proposed
+   filename</var>, and jump to the step labeled "sanitize"                  <!-- download="" works for all links when same-origin -->
+   below.</li>                                                          <!-- it is not used cross-origin, though, even for explicit user gestures -->
+                                                                            <!-- except: -->
+   <li><p>If the resource has a <code title=http-content-disposition>Content-Disposition</code> header       <!-- Content-Disposition: attachment with no filename="" allows download="" cross-origin -->
+   and that header specifies the <code title="">attachment</code>
+   disposition type, let <var title="">filename</var> have the value
+   of <var title="">proposed filename</var>, and jump to the step
+   labeled "sanitize" below. <a href=#refsRFC2183>[RFC2183]</a></li>
+
+   <li><p><i>No proposed filename</i>: If <var title="">trusted             <!-- fallback for same-origin resources or explicit downloads: use the resource's file name -->
+   operation</var> is true, or if the user indicated a preference for
+   having the resource in question downloaded, let <var title="">filename</var> have a value derived from the
+   <a href=#url>URL</a> of the resource in a user-agent-defined manner,
+   and jump to the step labeled "sanitize" below.</li>
+
+   <li>
+
+    <p>Act in a user-agent-defined manner to safeguard the user from a      <!-- no C-D: a header on cross-origin raises red flags -->
+    potentially hostile cross-origin download. If the download is not
+    to be aborted, then let <var title="">filename</var> be set to the
+    user's preferred file name or to a file name selected by the user
+    agent, and jump to the step labeled "sanitize" below.</p>
+
+    <div class=warning>
+
+     <p>If the algorithm reaches this step, then a download was begun
+     from a different origin than the resource being downloaded, and
+     the origin did not mark the file as suitable for downloading, and
+     the download was not initiated by the user. This could be because
+     a <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute
+     was used to trigger the download, or because the resource in
+     question is not of a type that the user agent supports.</p>
+
+     <p>This could be dangerous, because, for instance, a hostile
+     server could be trying to get a user to unknowingly download
+     private information and then re-upload it to the hostile server,
+     by tricking the user into thinking the data is from the hostile
+     server.</p>
+
+     <p>Thus, it is in the user's interests that the user be somehow
+     notified that the resource in question comes from quite a
+     different source, and to prevent confusion, any suggested
+     filename from the potentially hostile <var title="">interface
+     origin</var> should be ignored.</p>
+
+    </div>
+
+   </li>
+
+   <li><p><i>Sanitize</i>: Optionally, allow the user to influence <var title="">filename</var>. For example, a user agent could prompt the
+   user for a file name, potentially providing the value of <var title="">filename</var> as determined above as a default
+   value.</li>
+
+   <li>
+
+    <p>Adjust <var title="">filename</var> to be suitable for the
+    local file system.</p>
+
+    <p class=example>For example, this could involve removing
+    characters that are not legal in file names, or trimming leading
+    and trailing white space.</p>
+
+   </li>
+
+   <li><p>If the platform conventions do not in any way use <a href=#concept-extension title=concept-extension>extensions</a> to determine the types
+   of file on the file system, then return <var title="">filename</var> as the file name and abort these
+   steps.</li>
+
+   <li><p>Let <var title="">claimed type</var> be the type given by
+   the resource's <a href=#content-type title=Content-Type>Content-Type
+   metadata</a>, if any is known. Let <var title="">named
+   type</var> be the type given by <var title="">filename</var>'s
+   <a href=#concept-extension title=concept-extension>extension</a>, if any is known.
+   For the purposes of this step, a <i>type</i> is a mapping of a
+   <a href=#mime-type>MIME type</a> to an <a href=#concept-extension title=concept-extension>extension</a>.</li>
+
+   <li><p>If <var title="">named type</var> is consistent with the
+   user's preferences (e.g. because the value of <var title="">filename</var> was determined by prompting the user), then
+   return <var title="">filename</var> as the file name and abort
+   these steps.</li>
+
+   <li><p>If <var title="">claimed type</var> and <var title="">named
+   type</var> are the same type (i.e. the type given by the resource's
+   <a href=#content-type title=Content-Type>Content-Type metadata</a> is
+   consistent with the type given by <var title="">filename</var>'s
+   <a href=#concept-extension title=concept-extension>extension</a>), then return <var title="">filename</var> as the file name and abort these
+   steps.</li>
+
+   <li>
+
+    <p>If the <var title="">claimed type</var> is known, then alter
+    <var title="">filename</var> to add an <a href=#concept-extension title=concept-extension>extension</a> corresponding to <var title="">claimed type</var>.</p>
+
+    <p>Otherwise, if <var title="">named type</var> is known to be
+    potentially dangerous (e.g. it will be treated by the platform
+    conventions as a native executable, shell script, HTML
+    application, or executable-macro-capable document) then optionally
+    alter <var title="">filename</var> to add a known-safe <a href=#concept-extension title=concept-extension>extension</a> (e.g. "<code title="">.txt</code>").</p>
+
+    <p class=note>This last step would make it impossible to
+    download executables, which might not be desireable. As always,
+    implementors are forced to balance security and usability in this
+    matter.</p>
+
+   </li>
+
+   <li><p>Return <var title="">filename</var> as the file
+   name.</li>
+
+  </ol><p>For the purposes of this algorithm, a file <dfn id=concept-extension title=concept-extension>extension</dfn> consists of any part of
+  the file name that platform conventions dictate will be used for
+  identifying the type of the file. For example, many operating
+  systems use the part of the file name following the last dot ("<code title="">.</code>") in the file name to determine the type of the
+  file, and from that the manner in which the file is to be opened or
+  executed.</p>
+
+  <p>User agents should ignore any directory or path information
+  provided by the resource itself, its <a href=#url>URL</a>, and any <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute, in
+  deciding where to store the resulting file in the user's file
+  system.</p>
+
+  </div>
+
+<!--DOWNLOAD-->
+
+
 <!--PING-->
+
   <div class=impl>
 
-  <h5 id=hyperlink-auditing><span class=secno>4.12.3.1 </span><dfn>Hyperlink auditing</dfn></h5>
+  <h5 id=hyperlink-auditing><span class=secno>4.12.4.1 </span><dfn>Hyperlink auditing</dfn></h5>
 
   <p>If a <a href=#hyperlink>hyperlink</a> created by an <code><a href=#the-a-element>a</a></code> or
   <code><a href=#the-area-element>area</a></code> element has a <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute, and the user
@@ -54447,7 +54754,7 @@
 
 
 
-  <h4 id=linkTypes><span class=secno>4.12.4 </span>Link types</h4>
+  <h4 id=linkTypes><span class=secno>4.12.5 </span>Link types</h4>
 
   <p>The following table summarizes the link types that are defined by
   this specification. This table is non-normative; the actual
@@ -54575,7 +54882,7 @@
   -->
 
 
-  <h5 id=rel-alternate><span class=secno>4.12.4.1 </span>Link type "<dfn title=rel-alternate><code>alternate</code></dfn>"</h5>
+  <h5 id=rel-alternate><span class=secno>4.12.5.1 </span>Link type "<dfn title=rel-alternate><code>alternate</code></dfn>"</h5>
 
   <p>The <code title=rel-alternate><a href=#rel-alternate>alternate</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -54679,7 +54986,7 @@
 
    </dd>
 
-  </dl><h5 id=link-type-author><span class=secno>4.12.4.2 </span>Link type "<dfn title=rel-author><code>author</code></dfn>"</h5>
+  </dl><h5 id=link-type-author><span class=secno>4.12.5.2 </span>Link type "<dfn title=rel-author><code>author</code></dfn>"</h5>
 
   <p>The <code title=rel-author><a href=#link-type-author>author</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -54710,7 +55017,7 @@
   </div>
 
 
-  <h5 id=link-type-bookmark><span class=secno>4.12.4.3 </span>Link type "<dfn title=rel-bookmark><code>bookmark</code></dfn>"</h5>
+  <h5 id=link-type-bookmark><span class=secno>4.12.5.3 </span>Link type "<dfn title=rel-bookmark><code>bookmark</code></dfn>"</h5>
 
   <p>The <code title=rel-bookmark><a href=#link-type-bookmark>bookmark</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -54777,7 +55084,7 @@
 -->
 
 
-  <h5 id=link-type-external><span class=secno>4.12.4.4 </span>Link type "<dfn title=rel-external><code>external</code></dfn>"</h5>
+  <h5 id=link-type-external><span class=secno>4.12.5.4 </span>Link type "<dfn title=rel-external><code>external</code></dfn>"</h5>
 
   <p>The <code title=rel-external><a href=#link-type-external>external</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -54788,7 +55095,7 @@
   that the current document forms a part of.</p>
 
 
-  <h5 id=link-type-help><span class=secno>4.12.4.5 </span>Link type "<dfn title=rel-help><code>help</code></dfn>"</h5>
+  <h5 id=link-type-help><span class=secno>4.12.5.5 </span>Link type "<dfn title=rel-help><code>help</code></dfn>"</h5>
 
   <p>The <code title=rel-help><a href=#link-type-help>help</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -54813,7 +55120,7 @@
   document provides help for the page as a whole.</p>
 
 
-  <h5 id=rel-icon><span class=secno>4.12.4.6 </span>Link type "<dfn title=rel-icon><code>icon</code></dfn>"</h5>
+  <h5 id=rel-icon><span class=secno>4.12.5.6 </span>Link type "<dfn title=rel-icon><code>icon</code></dfn>"</h5>
 
   <p>The <code title=rel-icon><a href=#rel-icon>icon</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a>.</p>
@@ -54949,7 +55256,7 @@
   </div>
 
 
-  <h5 id=link-type-license><span class=secno>4.12.4.7 </span>Link type "<dfn title=rel-license><code>license</code></dfn>"</h5>
+  <h5 id=link-type-license><span class=secno>4.12.5.7 </span>Link type "<dfn title=rel-license><code>license</code></dfn>"</h5>
 
   <p>The <code title=rel-license><a href=#link-type-license>license</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -55015,7 +55322,7 @@
   </div>
 
 
-  <h5 id=link-type-nofollow><span class=secno>4.12.4.8 </span>Link type "<dfn title=rel-nofollow><code>nofollow</code></dfn>"</h5>
+  <h5 id=link-type-nofollow><span class=secno>4.12.5.8 </span>Link type "<dfn title=rel-nofollow><code>nofollow</code></dfn>"</h5>
 
   <p>The <code title=rel-nofollow><a href=#link-type-nofollow>nofollow</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -55030,7 +55337,7 @@
   affiliated with the two pages.</p>
 
 
-  <h5 id=link-type-noreferrer><span class=secno>4.12.4.9 </span>Link type "<dfn title=rel-noreferrer><code>noreferrer</code></dfn>"</h5>
+  <h5 id=link-type-noreferrer><span class=secno>4.12.5.9 </span>Link type "<dfn title=rel-noreferrer><code>noreferrer</code></dfn>"</h5>
 
   <p>The <code title=rel-noreferrer><a href=#link-type-noreferrer>noreferrer</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -55058,7 +55365,7 @@
   e.g. letting <img> or CSS or <video> hide the referrer -->
 
 
-  <h5 id=link-type-pingback><span class=secno>4.12.4.10 </span>Link type "<dfn title=rel-pingback><code>pingback</code></dfn>"</h5>
+  <h5 id=link-type-pingback><span class=secno>4.12.5.10 </span>Link type "<dfn title=rel-pingback><code>pingback</code></dfn>"</h5>
 
   <p>The <code title=rel-pingback><a href=#link-type-pingback>pingback</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a>.</p>
@@ -55067,7 +55374,7 @@
   specification. <a href=#refsPINGBACK>[PINGBACK]</a></p>
 
 
-  <h5 id=link-type-prefetch><span class=secno>4.12.4.11 </span>Link type "<dfn title=rel-prefetch><code>prefetch</code></dfn>"</h5>
+  <h5 id=link-type-prefetch><span class=secno>4.12.5.11 </span>Link type "<dfn title=rel-prefetch><code>prefetch</code></dfn>"</h5>
 
   <p>The <code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -55082,7 +55389,7 @@
   <p>There is no default type for resources given by the <code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code> keyword.</p>
 
 
-  <h5 id=link-type-search><span class=secno>4.12.4.12 </span>Link type "<dfn title=rel-search><code>search</code></dfn>"</h5>
+  <h5 id=link-type-search><span class=secno>4.12.5.12 </span>Link type "<dfn title=rel-search><code>search</code></dfn>"</h5>
 
   <p>The <code title=rel-search><a href=#link-type-search>search</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -55097,7 +55404,7 @@
   autodiscover search interfaces. <a href=#refsOPENSEARCH>[OPENSEARCH]</a></p>
 
 
-  <h5 id=link-type-sidebar><span class=secno>4.12.4.13 </span>Link type "<dfn title=rel-sidebar><code>sidebar</code></dfn>"</h5>
+  <h5 id=link-type-sidebar><span class=secno>4.12.5.13 </span>Link type "<dfn title=rel-sidebar><code>sidebar</code></dfn>"</h5>
 
   <p>The <code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -55111,7 +55418,7 @@
   <p>A <a href=#hyperlink>hyperlink</a> with the <code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code> keyword specified is a <dfn id=rel-sidebar-hyperlink title=rel-sidebar-hyperlink>sidebar hyperlink</dfn>.</p>
 
 
-  <h5 id=link-type-stylesheet><span class=secno>4.12.4.14 </span>Link type "<dfn title=rel-stylesheet><code>stylesheet</code></dfn>"</h5>
+  <h5 id=link-type-stylesheet><span class=secno>4.12.5.14 </span>Link type "<dfn title=rel-stylesheet><code>stylesheet</code></dfn>"</h5>
 
   <p>The <code title=rel-stylesheet><a href=#link-type-stylesheet>stylesheet</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a> that
@@ -55150,7 +55457,7 @@
   </div>
 
 
-  <h5 id=link-type-tag><span class=secno>4.12.4.15 </span>Link type "<dfn title=rel-tag><code>tag</code></dfn>"</h5>
+  <h5 id=link-type-tag><span class=secno>4.12.5.15 </span>Link type "<dfn title=rel-tag><code>tag</code></dfn>"</h5>
 
   <p>The <code title=rel-tag><a href=#link-type-tag>tag</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -55167,7 +55474,7 @@
 
 
 
-  <h5 id=sequential-link-types><span class=secno>4.12.4.16 </span>Sequential link types</h5>
+  <h5 id=sequential-link-types><span class=secno>4.12.5.16 </span>Sequential link types</h5>
 
   <p>Some documents form part of a sequence of documents.</p>
 
@@ -55179,7 +55486,7 @@
   <p>A document may be part of multiple sequences.</p>
 
 
-  <h6 id=link-type-next><span class=secno>4.12.4.16.1 </span>Link type "<dfn title=rel-next><code>next</code></dfn>"</h6>
+  <h6 id=link-type-next><span class=secno>4.12.5.16.1 </span>Link type "<dfn title=rel-next><code>next</code></dfn>"</h6>
 
   <p>The <code title=rel-next><a href=#link-type-next>next</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -55190,7 +55497,7 @@
   document that is the next logical document in the sequence.</p>
 
 
-  <h6 id=link-type-prev><span class=secno>4.12.4.16.2 </span>Link type "<dfn title=rel-prev><code>prev</code></dfn>"</h6>
+  <h6 id=link-type-prev><span class=secno>4.12.5.16.2 </span>Link type "<dfn title=rel-prev><code>prev</code></dfn>"</h6>
 
   <p>The <code title=rel-prev><a href=#link-type-prev>prev</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -55209,7 +55516,7 @@
   </div>
 
 
-  <h5 id=other-link-types><span class=secno>4.12.4.17 </span>Other link types</h5>
+  <h5 id=other-link-types><span class=secno>4.12.5.17 </span>Other link types</h5>
 
   <!-- XXX should update this section to more closely match the wiki -->
   <!-- possibly also applying the principles described here:
@@ -64218,21 +64525,33 @@
 
    </li>
 
-   <li><p>If the document's out-of-band metadata (e.g. HTTP headers),
-   not counting any <a href=#content-type title=Content-Type>type information</a>
-   (such as the Content-Type HTTP header), requires some sort of
-   processing that will not affect the browsing context, then perform
-   that processing and abort these steps.</p>
+   <li>
 
-   <div class=note>
-    <p>Such processing might be triggered by, amongst other things, the
-    following:</p>
-    <ul class=brief><li>HTTP status codes (e.g. 204 No Content or 205 Reset Content)</li>
-     <li>HTTP Content-Disposition headers</li>
-     <li>Network errors</li>
-    </ul></div>
+    <p>If the document's out-of-band metadata (e.g. HTTP headers), not
+    counting any <a href=#content-type title=Content-Type>type information</a>
+    (such as the Content-Type HTTP header), requires some sort of
+    processing that will not affect the browsing context, then perform
+    that processing and abort these steps.</p>
 
-    <!-- theorectically, HTTP 205 processing would occur here,
+    <div class=note>
+     <p>Such processing might be triggered by, amongst other things, the
+     following:</p>
+     <ul class=brief><li>HTTP status codes (e.g. 204 No Content or 205 Reset Content)</li>
+      <li>Network errors (e.g. the network interface being unavailable)</li>
+      <li>Cryptographic protocol failures (e.g. an incorrect TLS certificate)</li>
+      <!-- Other schemes are handled earlier -->
+      <!-- Content-Disposition is handled below -->
+      <!-- Content-Type is handled in subsequent steps -->
+      <!-- ...and I can't think of any others. -->
+     </ul></div>
+
+<!--DOWNLOAD-->
+    <p>Responses with HTTP <code title=http-content-disposition>Content-Disposition</code>
+    headers specifying the <code title="">attachment</code>
+    disposition type must be handled <a href=#as-a-download>as a download</a>.</p>
+<!--DOWNLOAD-->
+
+    <!-- theoretically, HTTP 205 processing would occur here,
     resetting all forms with no other effect. However, it seems nobody
     actually wants to use this ability, so requiring it here seems
     like unnecessary work. -->
@@ -97485,9 +97804,10 @@
      <td><a href=#global-attributes title="global attributes">globals</a>;
          <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>;
          <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+         <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>;
          <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
          <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>;
          <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>;
          <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>;
@@ -97521,9 +97841,10 @@
          <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code>;
          <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>;
          <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+         <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>;
          <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
          <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>;
          <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>;
          <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>;
@@ -99122,6 +99443,13 @@
           <code title=attr-fe-disabled><a href=#attr-fe-disabled>textarea</a></code>
      <td> Whether the form control is disabled
      <td> <a href=#boolean-attribute>Boolean attribute</a>
+<!--DOWNLOAD-->
+    <tr><th> <code title="">download</code>
+     <td> <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>a</a></code>;
+          <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>area</a></code>
+     <td> Whether to download the resource instead of navigating to it, and its filename if so
+     <td> Text
+<!--DOWNLOAD-->
     <tr><th> <code title="">draggable</code>
      <td> <a href=#the-draggable-attribute title=attr-draggable>HTML elements</a>
      <td> Whether the element is draggable
@@ -100775,6 +101103,9 @@
    <dd><cite><a href=http://tools.ietf.org/html/rfc2119>Key words for use in
    RFCs to Indicate Requirement Levels</a></cite>, S. Bradner. IETF.</dd>
 
+   <dt id=refsRFC2183>[RFC2183]</dt>
+   <dd><cite><a href=http://tools.ietf.org/html/rfc2183>Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</a></cite>, R. Troost, S. Dorner, K. Moore. IETF.</dd>
+
    <dt id=refsRFC2237>[RFC2237]</dt>
    <dd><cite><a href=http://tools.ietf.org/html/rfc2237>Japanese Character
    Encoding for Internet Messages</a></cite>, K. Tamaru. IETF.</dd>

Modified: index
===================================================================
--- index	2011-07-20 22:28:31 UTC (rev 6317)
+++ index	2011-07-22 07:01:41 UTC (rev 6318)
@@ -243,7 +243,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 July 2011</h2>
+    <h2 class="no-num no-toc">Living Standard — Last Updated 22 July 2011</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>
@@ -774,31 +774,32 @@
     <ol>
      <li><a href=#introduction-4><span class=secno>4.12.1 </span>Introduction</a></li>
      <li><a href=#links-created-by-a-and-area-elements><span class=secno>4.12.2 </span>Links created by <code>a</code> and <code>area</code> elements</a></li>
-     <li><a href=#following-hyperlinks-0><span class=secno>4.12.3 </span>Following hyperlinks</a>
+     <li><a href=#following-hyperlinks-0><span class=secno>4.12.3 </span>Following hyperlinks</a></li>
+     <li><a href=#downloading-resources><span class=secno>4.12.4 </span>Downloading resources</a>
       <ol>
-       <li><a href=#hyperlink-auditing><span class=secno>4.12.3.1 </span>Hyperlink auditing</a></ol></li>
-     <li><a href=#linkTypes><span class=secno>4.12.4 </span>Link types</a>
+       <li><a href=#hyperlink-auditing><span class=secno>4.12.4.1 </span>Hyperlink auditing</a></ol></li>
+     <li><a href=#linkTypes><span class=secno>4.12.5 </span>Link types</a>
       <ol>
-       <li><a href=#rel-alternate><span class=secno>4.12.4.1 </span>Link type "<code>alternate</code>"</a></li>
-       <li><a href=#link-type-author><span class=secno>4.12.4.2 </span>Link type "<code>author</code>"</a></li>
-       <li><a href=#link-type-bookmark><span class=secno>4.12.4.3 </span>Link type "<code>bookmark</code>"</a></li>
-       <li><a href=#link-type-external><span class=secno>4.12.4.4 </span>Link type "<code>external</code>"</a></li>
-       <li><a href=#link-type-help><span class=secno>4.12.4.5 </span>Link type "<code>help</code>"</a></li>
-       <li><a href=#rel-icon><span class=secno>4.12.4.6 </span>Link type "<code>icon</code>"</a></li>
-       <li><a href=#link-type-license><span class=secno>4.12.4.7 </span>Link type "<code>license</code>"</a></li>
-       <li><a href=#link-type-nofollow><span class=secno>4.12.4.8 </span>Link type "<code>nofollow</code>"</a></li>
-       <li><a href=#link-type-noreferrer><span class=secno>4.12.4.9 </span>Link type "<code>noreferrer</code>"</a></li>
-       <li><a href=#link-type-pingback><span class=secno>4.12.4.10 </span>Link type "<code>pingback</code>"</a></li>
-       <li><a href=#link-type-prefetch><span class=secno>4.12.4.11 </span>Link type "<code>prefetch</code>"</a></li>
-       <li><a href=#link-type-search><span class=secno>4.12.4.12 </span>Link type "<code>search</code>"</a></li>
-       <li><a href=#link-type-sidebar><span class=secno>4.12.4.13 </span>Link type "<code>sidebar</code>"</a></li>
-       <li><a href=#link-type-stylesheet><span class=secno>4.12.4.14 </span>Link type "<code>stylesheet</code>"</a></li>
-       <li><a href=#link-type-tag><span class=secno>4.12.4.15 </span>Link type "<code>tag</code>"</a></li>
-       <li><a href=#sequential-link-types><span class=secno>4.12.4.16 </span>Sequential link types</a>
+       <li><a href=#rel-alternate><span class=secno>4.12.5.1 </span>Link type "<code>alternate</code>"</a></li>
+       <li><a href=#link-type-author><span class=secno>4.12.5.2 </span>Link type "<code>author</code>"</a></li>
+       <li><a href=#link-type-bookmark><span class=secno>4.12.5.3 </span>Link type "<code>bookmark</code>"</a></li>
+       <li><a href=#link-type-external><span class=secno>4.12.5.4 </span>Link type "<code>external</code>"</a></li>
+       <li><a href=#link-type-help><span class=secno>4.12.5.5 </span>Link type "<code>help</code>"</a></li>
+       <li><a href=#rel-icon><span class=secno>4.12.5.6 </span>Link type "<code>icon</code>"</a></li>
+       <li><a href=#link-type-license><span class=secno>4.12.5.7 </span>Link type "<code>license</code>"</a></li>
+       <li><a href=#link-type-nofollow><span class=secno>4.12.5.8 </span>Link type "<code>nofollow</code>"</a></li>
+       <li><a href=#link-type-noreferrer><span class=secno>4.12.5.9 </span>Link type "<code>noreferrer</code>"</a></li>
+       <li><a href=#link-type-pingback><span class=secno>4.12.5.10 </span>Link type "<code>pingback</code>"</a></li>
+       <li><a href=#link-type-prefetch><span class=secno>4.12.5.11 </span>Link type "<code>prefetch</code>"</a></li>
+       <li><a href=#link-type-search><span class=secno>4.12.5.12 </span>Link type "<code>search</code>"</a></li>
+       <li><a href=#link-type-sidebar><span class=secno>4.12.5.13 </span>Link type "<code>sidebar</code>"</a></li>
+       <li><a href=#link-type-stylesheet><span class=secno>4.12.5.14 </span>Link type "<code>stylesheet</code>"</a></li>
+       <li><a href=#link-type-tag><span class=secno>4.12.5.15 </span>Link type "<code>tag</code>"</a></li>
+       <li><a href=#sequential-link-types><span class=secno>4.12.5.16 </span>Sequential link types</a>
         <ol>
-         <li><a href=#link-type-next><span class=secno>4.12.4.16.1 </span>Link type "<code>next</code>"</a></li>
-         <li><a href=#link-type-prev><span class=secno>4.12.4.16.2 </span>Link type "<code>prev</code>"</a></ol></li>
-       <li><a href=#other-link-types><span class=secno>4.12.4.17 </span>Other link types</a></ol></ol></li>
+         <li><a href=#link-type-next><span class=secno>4.12.5.16.1 </span>Link type "<code>next</code>"</a></li>
+         <li><a href=#link-type-prev><span class=secno>4.12.5.16.2 </span>Link type "<code>prev</code>"</a></ol></li>
+       <li><a href=#other-link-types><span class=secno>4.12.5.17 </span>Other link types</a></ol></ol></li>
    <li><a href=#common-idioms-without-dedicated-elements><span class=secno>4.13 </span>Common idioms without dedicated elements</a>
     <ol>
      <li><a href=#the-main-part-of-the-content><span class=secno>4.13.1 </span>The main part of the content</a></li>
@@ -1440,7 +1441,7 @@
   specifications and are not currently available anywhere else:</p>
 
   <ul><li>The <code><a href=#peerconnection>PeerConnection</a></code> API and related video-conferencing features.</li> <!--PEERCONNECTION-->
-   <li>The <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute and related <a href=#hyperlink-auditing>hyperlink auditing</a> features.</li> <!--PING-->
+   <li>New hyperlink features: the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute to make download links and the <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute for <a href=#hyperlink-auditing>hyperlink auditing</a>.</li> <!--DOWNLOAD--><!--PING-->
    <li>The <a href=#webvtt>WebVTT</a> format and some <a href=#text-track>text track</a> API features.</li> <!--TTVTT-->
    <li>Rules for <a href=#atom>converting HTML to Atom</a>.</li> <!--MD-->
    <li>The <code title=dom-document-cssElementMap><a href=#dom-document-csselementmap>cssElementMap</a></code> feature for defining <span title="CSS element reference identifier">CSS element reference identifiers</span>.</li> <!--CSSREF-->
@@ -19789,9 +19790,10 @@
    <dd><a href=#global-attributes>Global attributes</a></dd>
    <dd><code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code></dd>
    <dd><code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code></dd>
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+   <dd><code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code></dd>
    <dd><code title=attr-hyperlink-ping><a href=#ping>ping</a></code></dd>
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
    <dd><code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code></dd>
    <dd><code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code></dd>
    <dd><code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code></dd>
@@ -19801,9 +19803,10 @@
 <pre class=idl>interface <dfn id=htmlanchorelement>HTMLAnchorElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
   stringifier attribute DOMString <a href=#dom-a-href title=dom-a-href>href</a>;
            attribute DOMString <a href=#dom-a-target title=dom-a-target>target</a>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+           attribute DOMString <a href=#dom-a-download title=dom-a-download>download</a>;
            attribute DOMString <a href=#dom-a-ping title=dom-a-ping>ping</a>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
            attribute DOMString <a href=#dom-a-rel title=dom-a-rel>rel</a>;
   readonly attribute <a href=#domtokenlist>DOMTokenList</a> <a href=#dom-a-rellist title=dom-a-relList>relList</a>;
            attribute DOMString <a href=#dom-a-media title=dom-a-media>media</a>;
@@ -19837,9 +19840,10 @@
   otherwise have been placed, if it had been relevant.</p>
 
   <p>The <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+  <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>,
   <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
   <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>, <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>, <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>, and <code title=attr-hyperlink-type><a href=#attr-hyperlink-type>type</a></code> attributes must be omitted
   if the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute is
   not present.</p>
@@ -19860,13 +19864,18 @@
 
   <div class=impl>
 
-  <p>The <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>, <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>
-<!--PING-->
-  and <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>
-<!--PING-->
-  attributes affect what
-  happens when users <a href=#following-hyperlinks title="following hyperlinks">follow
-  hyperlinks</a> created using the <code><a href=#the-a-element>a</a></code> element.  The
+  <p>The <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>,
+  <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>,
+<!--DOWNLOAD--><!--PING-->
+  <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>, and
+  <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>
+<!--DOWNLOAD--><!--PING-->
+  attributes affect what happens when users <a href=#following-hyperlinks title="following
+  hyperlinks">follow hyperlinks</a>
+<!--DOWNLOAD-->
+  or <a href=#downloading-hyperlinks title="downloading hyperlinks">download hyperlinks</a>
+<!--DOWNLOAD-->
+  created using the <code><a href=#the-a-element>a</a></code> element.  The
   <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>, <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>, <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>, and <code title=attr-hyperlink-type><a href=#attr-hyperlink-type>type</a></code> attributes may be used to
   indicate to the user the likely nature of the target resource before
   the user follows the link.</p>
@@ -19878,7 +19887,10 @@
   <ol><li><p>If the <code title=event-click><a href=#event-click>click</a></code> event in
    question is not <a href=#concept-events-trusted title=concept-events-trusted>trusted</a>
    (i.e. a <code title=dom-click><a href=#dom-click>click()</a></code> method call was the
-   reason for the event being dispatched), and the <code><a href=#the-a-element>a</a></code>
+   reason for the event being dispatched), and either the <code><a href=#the-a-element>a</a></code>
+<!--DOWNLOAD-->
+   element has a <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute or the
+<!--DOWNLOAD-->
    element's <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>
    attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a
    browsing context given a browsing context name</a>, using the
@@ -19913,10 +19925,17 @@
     </ol></li>
 
    <li><p>Finally, the user agent must <a href=#following-hyperlinks title="following
-   hyperlinks">follow the hyperlink</a> created by the
-   <code><a href=#the-a-element>a</a></code> element. If the steps above defined a <var><a href=#hyperlink-suffix>hyperlink
-   suffix</a></var>, then take that into account when following the
-   hyperlink.</li>
+   hyperlinks">follow the hyperlink</a>
+<!--DOWNLOAD-->
+   or <a href=#downloading-hyperlinks title="downloading hyperlinks">download the hyperlink</a>
+<!--DOWNLOAD-->
+   created by the <code><a href=#the-a-element>a</a></code> element, as determined by
+<!--DOWNLOAD-->
+   the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute and
+<!--DOWNLOAD-->
+   any expressed user preference. If the steps above defined a
+   <var><a href=#hyperlink-suffix>hyperlink suffix</a></var>, then take that into account when
+   following or downloading the hyperlink.</li>
 
   </ol></div>
 
@@ -19930,10 +19949,12 @@
 
   </dl><div class=impl>
 
-  <p>The IDL attributes <dfn id=dom-a-href title=dom-a-href><code>href</code></dfn>,
-<!--PING-->
+  <p>The IDL attributes
+  <dfn id=dom-a-href title=dom-a-href><code>href</code></dfn>,
+<!--DOWNLOAD--><!--PING-->
+  <dfn id=dom-a-download title=dom-a-download><code>download</code></dfn>,
   <dfn id=dom-a-ping title=dom-a-ping><code>ping</code></dfn>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
   <dfn id=dom-a-target title=dom-a-target><code>target</code></dfn>, <dfn id=dom-a-rel title=dom-a-rel><code>rel</code></dfn>, <dfn id=dom-a-media title=dom-a-media><code>media</code></dfn>, <dfn id=dom-a-hreflang title=dom-a-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-a-type title=dom-a-type><code>type</code></dfn>, must
   <a href=#reflect>reflect</a> the respective content attributes of the same
   name.</p>
@@ -38216,9 +38237,10 @@
    <dd><code title=attr-area-shape><a href=#attr-area-shape>shape</a></code></dd>
    <dd><code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code></dd>
    <dd><code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code></dd>
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+   <dd><code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code></dd>
    <dd><code title=attr-hyperlink-ping><a href=#ping>ping</a></code></dd>
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
    <dd><code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code></dd>
    <dd><code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code></dd>
    <dd><code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code></dd>
@@ -38231,9 +38253,10 @@
            attribute DOMString <a href=#dom-area-shape title=dom-area-shape>shape</a>;
   stringifier attribute DOMString <a href=#dom-area-href title=dom-area-href>href</a>;
            attribute DOMString <a href=#dom-area-target title=dom-area-target>target</a>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+           attribute DOMString <a href=#dom-area-download title=dom-area-download>download</a>;
            attribute DOMString <a href=#dom-area-ping title=dom-area-ping>ping</a>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
            attribute DOMString <a href=#dom-area-rel title=dom-area-rel>rel</a>;
   readonly attribute <a href=#domtokenlist>DOMTokenList</a> <a href=#dom-area-rellist title=dom-area-relList>relList</a>;
            attribute DOMString <a href=#dom-area-media title=dom-area-media>media</a>;
@@ -38353,15 +38376,20 @@
   <div class=impl>
 
   <p>When user agents allow users to <a href=#following-hyperlinks title="following
-  hyperlinks">follow hyperlinks</a> created using the
-  <code><a href=#the-area-element>area</a></code> element, as described in the next section, the
+  hyperlinks">follow hyperlinks</a>
+<!--DOWNLOAD-->
+  or <a href=#downloading-hyperlinks title="downloading hyperlinks">download hyperlinks</a>
+<!--DOWNLOAD-->
+  created using the <code><a href=#the-area-element>area</a></code> element, as described in the
+  next section, the
   <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>,
-  <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>
-<!--PING-->
-  and <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>
-<!--PING-->
-  attributes decide how the
-  link is followed. The <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>,
+  <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>,
+<!--DOWNLOAD--><!--PING-->
+  <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>, and
+  <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>
+<!--DOWNLOAD--><!--PING-->
+  attributes decide how the link is followed.
+  The <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>,
   <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>, <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>, and <code title=attr-hyperlink-type><a href=#attr-hyperlink-type>type</a></code> attributes may be used to
   indicate to the user the likely nature of the target resource before
   the user follows the link.</p>
@@ -38369,9 +38397,10 @@
   </div>
 
   <p>The <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+  <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>,
   <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
   <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>, <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>, <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>, and <code title=attr-hyperlink-type><a href=#attr-hyperlink-type>type</a></code> attributes must be omitted
   if the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute is
   not present.</p>
@@ -38385,6 +38414,9 @@
    question is not <a href=#concept-events-trusted title=concept-events-trusted>trusted</a>
    (i.e. a <code title=dom-click><a href=#dom-click>click()</a></code> method call was the
    reason for the event being dispatched), and the <code><a href=#the-area-element>area</a></code>
+<!--DOWNLOAD-->
+   element has a <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute or the
+<!--DOWNLOAD-->
    element's <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>
    attribute is present and applying <a href=#the-rules-for-choosing-a-browsing-context-given-a-browsing-context-name>the rules for choosing a
    browsing context given a browsing context name</a>, using the
@@ -38394,14 +38426,22 @@
    <code><a href=#invalid_access_err>INVALID_ACCESS_ERR</a></code> exception and abort these
    steps.</li>
 
-   <li>Otherwise, the user agent must <a href=#following-hyperlinks title="following
-   hyperlinks">follow the hyperlink</a> created by the
-   <code><a href=#the-area-element>area</a></code> element, if any.</li>
+   <li><p>Otherwise, the user agent must <a href=#following-hyperlinks title="following
+   hyperlinks">follow the hyperlink</a>
+<!--DOWNLOAD-->
+   or <a href=#downloading-hyperlinks title="downloading hyperlinks">download the hyperlink</a>
+<!--DOWNLOAD-->
+   created by the <code><a href=#the-area-element>area</a></code> element, if any, and as determined by
+<!--DOWNLOAD-->
+   the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute and
+<!--DOWNLOAD-->
+   any expressed user preference.</li>
 
   </ol><p>The IDL attributes <dfn id=dom-area-alt title=dom-area-alt><code>alt</code></dfn>, <dfn id=dom-area-coords title=dom-area-coords><code>coords</code></dfn>, <dfn id=dom-area-href title=dom-area-href><code>href</code></dfn>, <dfn id=dom-area-target title=dom-area-target><code>target</code></dfn>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+  <dfn id=dom-area-download title=dom-area-download><code>download</code></dfn>,
   <dfn id=dom-area-ping title=dom-area-ping><code>ping</code></dfn>,
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
   <dfn id=dom-area-rel title=dom-area-rel><code>rel</code></dfn>, <dfn id=dom-area-media title=dom-area-media><code>media</code></dfn>, <dfn id=dom-area-hreflang title=dom-area-hreflang><code>hreflang</code></dfn>, and <dfn id=dom-area-type title=dom-area-type><code>type</code></dfn>, each must
   <a href=#reflect>reflect</a> the respective content attributes of the same
   name.</p>
@@ -54083,6 +54123,37 @@
   context</a> that will be used. <span class=impl>User agents use
   this name when <a href=#following-hyperlinks>following hyperlinks</a>.</span></p>
 
+<!--DOWNLOAD-->
+  <p>When an <code><a href=#the-a-element>a</a></code> or <code><a href=#the-area-element>area</a></code> element's
+  <a href=#activation-behavior>activation behavior</a> is invoked, the user agent may
+  allow the user to indicate a preference regarding whether the
+  hyperlink is to be used for <a href=#navigate title=navigate>navigation</a>
+  or whether the resource it specifies is to be downloaded.</p>
+
+  <p>In the absence of a user preference, the default should be
+  navigation if the element has no <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute, and
+  should be to download the specified resource if it does.</p>
+
+  <p>Whether determined by the user's preferences or via the presence
+  or absence of the attribute, if the decision is to use the hyperlink
+  for <a href=#navigate title=navigate>navigation</a> then the user agent
+  must <a href=#following-hyperlinks title="following hyperlinks">follow the hyperlink</a>,
+  and if the decision is to use the hyperlink to download a resource,
+  the user agent must <a href=#downloading-hyperlinks title="downloading hyperlinks">download
+  the hyperlink</a>. These terms are defined in subsequent sections
+  below.</p>
+
+  <p>The <dfn id=attr-hyperlink-download title=attr-hyperlink-download><code>download</code></dfn>
+  attribute, if present, indicates that the author intends the
+  hyperlink to be used for downloading a resource. The attribute may
+  have a value; the value, if any, specifies the default filename that
+  the author recommends for use in labeling the resource in a local
+  file system. There are no restrictions on allowed values, but
+  authors are cautioned that most file systems have limitations with
+  regard to what punctuation is supported in file names, and user
+  agents are likely to adjust file names accordingly.</p>
+<!--DOWNLOAD-->
+
 <!--PING-->
   <p>The <dfn id=ping title=attr-hyperlink-ping><code>ping</code></dfn> attribute, if
   present, gives the URLs of the resources that are interested in
@@ -54194,10 +54265,246 @@
   </div>
 
 
+<!--DOWNLOAD-->
+
+  <h4 id=downloading-resources><span class=secno>4.12.4 </span>Downloading resources</h4>
+
+  <p>In some cases, resources are intended for later use rather than
+  immediate viewing. To indicate that a resource is intended to be
+  downloaded for use later, rather than immediately used, the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute can be
+  specified on the <code><a href=#the-a-element>a</a></code> or <code><a href=#the-area-element>area</a></code> element that
+  creates the <a href=#hyperlink>hyperlink</a> to that resource.</p>
+
+  <p>The attribute can furthermore be given a value, to specify the
+  filename that user agents are to use when storing the resource in a
+  file system. This value can be overridden by the <code title=http-content-disposition>Content-Disposition</code> HTTP
+  header's <code title="">filename</code> parameter. <a href=#refsRFC2183>[RFC2183]</a></p>
+
+  <p>In cross-origin situations, the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute has to be
+  combined with the <code title=http-content-disposition>Content-Disposition</code> HTTP
+  header, specifically with the <code title="">attachment</code>
+  disposition type, to avoid the user being warned of possibly
+  nefarious activity. (This is to protect users from being made to
+  download sensitive personal or confidential information without
+  their full understanding.)</p>
+
+  <div class=impl>
+
+  <hr><p>When a user <dfn id=downloading-hyperlinks title="downloading hyperlinks">downloads a
+  hyperlink</dfn> created by an element, the user agent must run the
+  following steps:</p>
+
+  <ol><li><p><a href=#resolve-a-url title="resolve a url">Resolve</a> the
+   <a href=#url>URL</a> given by the <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code> attribute of that element,
+   relative to that element.</li>
+
+   <li><p>If <a href=#resolve-a-url title="resolve a url">resolving</a> the
+   <a href=#url>URL</a> fails, the user agent may report the error to the
+   user in a user-agent-specific manner, may
+   <a href=#navigate>navigate</a><!--DONAV download error--> to an error page
+   to report the error, or may ignore the error and do nothing. In
+   either case, the user agent must abort these steps.</p>
+
+   <li><p>Otherwise, let <var title="">URL</var> be the resulting
+   <a href=#absolute-url>absolute URL</a>.</li>
+
+   <li><p>In the case of server-side image maps, append the
+   <var><a href=#hyperlink-suffix>hyperlink suffix</a></var> to <var title="">URL</var>.</li>
+
+   <li><p>Return to whatever algorithm invoked these steps and continue
+   these steps asynchronously.</li>
+
+   <li><p><a href=#fetch>Fetch</a> <var title="">URL</var> and handle the
+   resulting resource <a href=#as-a-download>as a download</a>.</li> <!--
+   http-origin privacy sensitive -->
+
+  </ol><p>When a user agent is to handle a resource obtained from a
+  <a href=#fetch>fetch</a> algorithm <dfn id=as-a-download>as a download</dfn>, it should
+  provide the user with a way to save the resource for later use, if a
+  resource is successfully obtained; or otherwise should report any
+  problems downloading the file to the user.</p>
+
+  <p>If the user agent needs a file name for a resource being handled
+  <a href=#as-a-download>as a download</a>, it should select one using the following
+  algorithm.</p>
+
+  <p class=warning>This algorithm is intended to mitigate security
+  dangers involved in downloading files from untrusted sites, and user
+  agents are strongly recommended to follow it.</p> <!-- but it's
+  optional, since it's not really an interoperability issue -->
+
+  <ol><li><p>Let <var title="">filename</var> be the void value.</li>
+
+   <li><p>If the resource has a <code title=http-content-disposition>Content-Disposition</code> header,      <!-- Content-Disposition: attachment; filename="" is always honoured, even cross-origin -->
+   that header specifies the <code title="">attachment</code>
+   disposition type, and the header includes a <code title="">filename</code> parameter, then let <var title="">filename</var> have that value, and jump to the step
+   labeled "sanitize" below. <a href=#refsRFC2183>[RFC2183]</a></li>
+
+   <li><p>Let <var title="">resource origin</var> be the
+   <a href=#origin>origin</a> of the resource being downloaded.</li>
+
+   <li><p>Let <var title="">interface origin</var> be the
+   <a href=#origin>origin</a> of the <code><a href=#document>Document</a></code> in which the <a href=#downloading-hyperlinks title="downloading hyperlinks">download</a> or
+   <a href=#navigate>navigate</a> action resulting in the download was
+   initiated, if any.</li>
+
+   <li><p>If there is no <var title="">interface origin</var>, then
+   let <var title="">trusted operation</var> be true. Otherwise, let
+   <var title="">trusted operation</var> be true if <var title="">resource origin</var> is the <a href=#same-origin>same origin</a> as
+   <var title="">interface origin</var>, and false otherwise.</li>
+
+   <li><p>If <var title="">trusted operation</var> is true and the          <!-- Content-Disposition: *; filename="" overrides download="" for same-origin -->
+   resource has a <code title=http-content-disposition>Content-Disposition</code> header
+   and that header includes a <code title="">filename</code>
+   parameter, then let <var title="">filename</var> have that value,
+   and jump to the step labeled "sanitize" below. <a href=#refsRFC2183>[RFC2183]</a></li>
+
+   <li><p>If the download was not initiated from a
+   <a href=#hyperlink>hyperlink</a> created by an <code><a href=#the-a-element>a</a></code> or
+   <code><a href=#the-area-element>area</a></code> element, or if the element of the
+   <a href=#hyperlink>hyperlink</a> from which it was initiated did not have a
+   <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute
+   when the download was initiated, or if there was such an attribute
+   but its value when the download was initiated was the empty string,
+   then jump to the step labeled <i>no proposed filename</i>.</li>
+
+   <li><p>Let <var title="">proposed filename</var> have the value of
+   the <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute
+   of the element of the <a href=#hyperlink>hyperlink</a> that initiated the
+   download at the time the download was initiated.</li>
+
+   <li><p>If <var title="">trusted operation</var> is true, let <var title="">filename</var> have the value of <var title="">proposed
+   filename</var>, and jump to the step labeled "sanitize"                  <!-- download="" works for all links when same-origin -->
+   below.</li>                                                          <!-- it is not used cross-origin, though, even for explicit user gestures -->
+                                                                            <!-- except: -->
+   <li><p>If the resource has a <code title=http-content-disposition>Content-Disposition</code> header       <!-- Content-Disposition: attachment with no filename="" allows download="" cross-origin -->
+   and that header specifies the <code title="">attachment</code>
+   disposition type, let <var title="">filename</var> have the value
+   of <var title="">proposed filename</var>, and jump to the step
+   labeled "sanitize" below. <a href=#refsRFC2183>[RFC2183]</a></li>
+
+   <li><p><i>No proposed filename</i>: If <var title="">trusted             <!-- fallback for same-origin resources or explicit downloads: use the resource's file name -->
+   operation</var> is true, or if the user indicated a preference for
+   having the resource in question downloaded, let <var title="">filename</var> have a value derived from the
+   <a href=#url>URL</a> of the resource in a user-agent-defined manner,
+   and jump to the step labeled "sanitize" below.</li>
+
+   <li>
+
+    <p>Act in a user-agent-defined manner to safeguard the user from a      <!-- no C-D: a header on cross-origin raises red flags -->
+    potentially hostile cross-origin download. If the download is not
+    to be aborted, then let <var title="">filename</var> be set to the
+    user's preferred file name or to a file name selected by the user
+    agent, and jump to the step labeled "sanitize" below.</p>
+
+    <div class=warning>
+
+     <p>If the algorithm reaches this step, then a download was begun
+     from a different origin than the resource being downloaded, and
+     the origin did not mark the file as suitable for downloading, and
+     the download was not initiated by the user. This could be because
+     a <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute
+     was used to trigger the download, or because the resource in
+     question is not of a type that the user agent supports.</p>
+
+     <p>This could be dangerous, because, for instance, a hostile
+     server could be trying to get a user to unknowingly download
+     private information and then re-upload it to the hostile server,
+     by tricking the user into thinking the data is from the hostile
+     server.</p>
+
+     <p>Thus, it is in the user's interests that the user be somehow
+     notified that the resource in question comes from quite a
+     different source, and to prevent confusion, any suggested
+     filename from the potentially hostile <var title="">interface
+     origin</var> should be ignored.</p>
+
+    </div>
+
+   </li>
+
+   <li><p><i>Sanitize</i>: Optionally, allow the user to influence <var title="">filename</var>. For example, a user agent could prompt the
+   user for a file name, potentially providing the value of <var title="">filename</var> as determined above as a default
+   value.</li>
+
+   <li>
+
+    <p>Adjust <var title="">filename</var> to be suitable for the
+    local file system.</p>
+
+    <p class=example>For example, this could involve removing
+    characters that are not legal in file names, or trimming leading
+    and trailing white space.</p>
+
+   </li>
+
+   <li><p>If the platform conventions do not in any way use <a href=#concept-extension title=concept-extension>extensions</a> to determine the types
+   of file on the file system, then return <var title="">filename</var> as the file name and abort these
+   steps.</li>
+
+   <li><p>Let <var title="">claimed type</var> be the type given by
+   the resource's <a href=#content-type title=Content-Type>Content-Type
+   metadata</a>, if any is known. Let <var title="">named
+   type</var> be the type given by <var title="">filename</var>'s
+   <a href=#concept-extension title=concept-extension>extension</a>, if any is known.
+   For the purposes of this step, a <i>type</i> is a mapping of a
+   <a href=#mime-type>MIME type</a> to an <a href=#concept-extension title=concept-extension>extension</a>.</li>
+
+   <li><p>If <var title="">named type</var> is consistent with the
+   user's preferences (e.g. because the value of <var title="">filename</var> was determined by prompting the user), then
+   return <var title="">filename</var> as the file name and abort
+   these steps.</li>
+
+   <li><p>If <var title="">claimed type</var> and <var title="">named
+   type</var> are the same type (i.e. the type given by the resource's
+   <a href=#content-type title=Content-Type>Content-Type metadata</a> is
+   consistent with the type given by <var title="">filename</var>'s
+   <a href=#concept-extension title=concept-extension>extension</a>), then return <var title="">filename</var> as the file name and abort these
+   steps.</li>
+
+   <li>
+
+    <p>If the <var title="">claimed type</var> is known, then alter
+    <var title="">filename</var> to add an <a href=#concept-extension title=concept-extension>extension</a> corresponding to <var title="">claimed type</var>.</p>
+
+    <p>Otherwise, if <var title="">named type</var> is known to be
+    potentially dangerous (e.g. it will be treated by the platform
+    conventions as a native executable, shell script, HTML
+    application, or executable-macro-capable document) then optionally
+    alter <var title="">filename</var> to add a known-safe <a href=#concept-extension title=concept-extension>extension</a> (e.g. "<code title="">.txt</code>").</p>
+
+    <p class=note>This last step would make it impossible to
+    download executables, which might not be desireable. As always,
+    implementors are forced to balance security and usability in this
+    matter.</p>
+
+   </li>
+
+   <li><p>Return <var title="">filename</var> as the file
+   name.</li>
+
+  </ol><p>For the purposes of this algorithm, a file <dfn id=concept-extension title=concept-extension>extension</dfn> consists of any part of
+  the file name that platform conventions dictate will be used for
+  identifying the type of the file. For example, many operating
+  systems use the part of the file name following the last dot ("<code title="">.</code>") in the file name to determine the type of the
+  file, and from that the manner in which the file is to be opened or
+  executed.</p>
+
+  <p>User agents should ignore any directory or path information
+  provided by the resource itself, its <a href=#url>URL</a>, and any <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code> attribute, in
+  deciding where to store the resulting file in the user's file
+  system.</p>
+
+  </div>
+
+<!--DOWNLOAD-->
+
+
 <!--PING-->
+
   <div class=impl>
 
-  <h5 id=hyperlink-auditing><span class=secno>4.12.3.1 </span><dfn>Hyperlink auditing</dfn></h5>
+  <h5 id=hyperlink-auditing><span class=secno>4.12.4.1 </span><dfn>Hyperlink auditing</dfn></h5>
 
   <p>If a <a href=#hyperlink>hyperlink</a> created by an <code><a href=#the-a-element>a</a></code> or
   <code><a href=#the-area-element>area</a></code> element has a <code title=attr-hyperlink-ping><a href=#ping>ping</a></code> attribute, and the user
@@ -54319,7 +54626,7 @@
 
 
 
-  <h4 id=linkTypes><span class=secno>4.12.4 </span>Link types</h4>
+  <h4 id=linkTypes><span class=secno>4.12.5 </span>Link types</h4>
 
   <p>The following table summarizes the link types that are defined by
   this specification. This table is non-normative; the actual
@@ -54447,7 +54754,7 @@
   -->
 
 
-  <h5 id=rel-alternate><span class=secno>4.12.4.1 </span>Link type "<dfn title=rel-alternate><code>alternate</code></dfn>"</h5>
+  <h5 id=rel-alternate><span class=secno>4.12.5.1 </span>Link type "<dfn title=rel-alternate><code>alternate</code></dfn>"</h5>
 
   <p>The <code title=rel-alternate><a href=#rel-alternate>alternate</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -54551,7 +54858,7 @@
 
    </dd>
 
-  </dl><h5 id=link-type-author><span class=secno>4.12.4.2 </span>Link type "<dfn title=rel-author><code>author</code></dfn>"</h5>
+  </dl><h5 id=link-type-author><span class=secno>4.12.5.2 </span>Link type "<dfn title=rel-author><code>author</code></dfn>"</h5>
 
   <p>The <code title=rel-author><a href=#link-type-author>author</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -54582,7 +54889,7 @@
   </div>
 
 
-  <h5 id=link-type-bookmark><span class=secno>4.12.4.3 </span>Link type "<dfn title=rel-bookmark><code>bookmark</code></dfn>"</h5>
+  <h5 id=link-type-bookmark><span class=secno>4.12.5.3 </span>Link type "<dfn title=rel-bookmark><code>bookmark</code></dfn>"</h5>
 
   <p>The <code title=rel-bookmark><a href=#link-type-bookmark>bookmark</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -54649,7 +54956,7 @@
 -->
 
 
-  <h5 id=link-type-external><span class=secno>4.12.4.4 </span>Link type "<dfn title=rel-external><code>external</code></dfn>"</h5>
+  <h5 id=link-type-external><span class=secno>4.12.5.4 </span>Link type "<dfn title=rel-external><code>external</code></dfn>"</h5>
 
   <p>The <code title=rel-external><a href=#link-type-external>external</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -54660,7 +54967,7 @@
   that the current document forms a part of.</p>
 
 
-  <h5 id=link-type-help><span class=secno>4.12.4.5 </span>Link type "<dfn title=rel-help><code>help</code></dfn>"</h5>
+  <h5 id=link-type-help><span class=secno>4.12.5.5 </span>Link type "<dfn title=rel-help><code>help</code></dfn>"</h5>
 
   <p>The <code title=rel-help><a href=#link-type-help>help</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -54685,7 +54992,7 @@
   document provides help for the page as a whole.</p>
 
 
-  <h5 id=rel-icon><span class=secno>4.12.4.6 </span>Link type "<dfn title=rel-icon><code>icon</code></dfn>"</h5>
+  <h5 id=rel-icon><span class=secno>4.12.5.6 </span>Link type "<dfn title=rel-icon><code>icon</code></dfn>"</h5>
 
   <p>The <code title=rel-icon><a href=#rel-icon>icon</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a>.</p>
@@ -54821,7 +55128,7 @@
   </div>
 
 
-  <h5 id=link-type-license><span class=secno>4.12.4.7 </span>Link type "<dfn title=rel-license><code>license</code></dfn>"</h5>
+  <h5 id=link-type-license><span class=secno>4.12.5.7 </span>Link type "<dfn title=rel-license><code>license</code></dfn>"</h5>
 
   <p>The <code title=rel-license><a href=#link-type-license>license</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -54887,7 +55194,7 @@
   </div>
 
 
-  <h5 id=link-type-nofollow><span class=secno>4.12.4.8 </span>Link type "<dfn title=rel-nofollow><code>nofollow</code></dfn>"</h5>
+  <h5 id=link-type-nofollow><span class=secno>4.12.5.8 </span>Link type "<dfn title=rel-nofollow><code>nofollow</code></dfn>"</h5>
 
   <p>The <code title=rel-nofollow><a href=#link-type-nofollow>nofollow</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -54902,7 +55209,7 @@
   affiliated with the two pages.</p>
 
 
-  <h5 id=link-type-noreferrer><span class=secno>4.12.4.9 </span>Link type "<dfn title=rel-noreferrer><code>noreferrer</code></dfn>"</h5>
+  <h5 id=link-type-noreferrer><span class=secno>4.12.5.9 </span>Link type "<dfn title=rel-noreferrer><code>noreferrer</code></dfn>"</h5>
 
   <p>The <code title=rel-noreferrer><a href=#link-type-noreferrer>noreferrer</a></code> keyword may be
   used with <code><a href=#the-a-element>a</a></code> and <code><a href=#the-area-element>area</a></code> elements. This
@@ -54930,7 +55237,7 @@
   e.g. letting <img> or CSS or <video> hide the referrer -->
 
 
-  <h5 id=link-type-pingback><span class=secno>4.12.4.10 </span>Link type "<dfn title=rel-pingback><code>pingback</code></dfn>"</h5>
+  <h5 id=link-type-pingback><span class=secno>4.12.5.10 </span>Link type "<dfn title=rel-pingback><code>pingback</code></dfn>"</h5>
 
   <p>The <code title=rel-pingback><a href=#link-type-pingback>pingback</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a>.</p>
@@ -54939,7 +55246,7 @@
   specification. <a href=#refsPINGBACK>[PINGBACK]</a></p>
 
 
-  <h5 id=link-type-prefetch><span class=secno>4.12.4.11 </span>Link type "<dfn title=rel-prefetch><code>prefetch</code></dfn>"</h5>
+  <h5 id=link-type-prefetch><span class=secno>4.12.5.11 </span>Link type "<dfn title=rel-prefetch><code>prefetch</code></dfn>"</h5>
 
   <p>The <code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -54954,7 +55261,7 @@
   <p>There is no default type for resources given by the <code title=rel-prefetch><a href=#link-type-prefetch>prefetch</a></code> keyword.</p>
 
 
-  <h5 id=link-type-search><span class=secno>4.12.4.12 </span>Link type "<dfn title=rel-search><code>search</code></dfn>"</h5>
+  <h5 id=link-type-search><span class=secno>4.12.5.12 </span>Link type "<dfn title=rel-search><code>search</code></dfn>"</h5>
 
   <p>The <code title=rel-search><a href=#link-type-search>search</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -54969,7 +55276,7 @@
   autodiscover search interfaces. <a href=#refsOPENSEARCH>[OPENSEARCH]</a></p>
 
 
-  <h5 id=link-type-sidebar><span class=secno>4.12.4.13 </span>Link type "<dfn title=rel-sidebar><code>sidebar</code></dfn>"</h5>
+  <h5 id=link-type-sidebar><span class=secno>4.12.5.13 </span>Link type "<dfn title=rel-sidebar><code>sidebar</code></dfn>"</h5>
 
   <p>The <code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -54983,7 +55290,7 @@
   <p>A <a href=#hyperlink>hyperlink</a> with the <code title=rel-sidebar><a href=#link-type-sidebar>sidebar</a></code> keyword specified is a <dfn id=rel-sidebar-hyperlink title=rel-sidebar-hyperlink>sidebar hyperlink</dfn>.</p>
 
 
-  <h5 id=link-type-stylesheet><span class=secno>4.12.4.14 </span>Link type "<dfn title=rel-stylesheet><code>stylesheet</code></dfn>"</h5>
+  <h5 id=link-type-stylesheet><span class=secno>4.12.5.14 </span>Link type "<dfn title=rel-stylesheet><code>stylesheet</code></dfn>"</h5>
 
   <p>The <code title=rel-stylesheet><a href=#link-type-stylesheet>stylesheet</a></code> keyword may be
   used with <code><a href=#the-link-element>link</a></code> elements. This keyword creates an <a href=#external-resource-link title="external resource link">external resource link</a> that
@@ -55022,7 +55329,7 @@
   </div>
 
 
-  <h5 id=link-type-tag><span class=secno>4.12.4.15 </span>Link type "<dfn title=rel-tag><code>tag</code></dfn>"</h5>
+  <h5 id=link-type-tag><span class=secno>4.12.5.15 </span>Link type "<dfn title=rel-tag><code>tag</code></dfn>"</h5>
 
   <p>The <code title=rel-tag><a href=#link-type-tag>tag</a></code> keyword may be used
   with <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -55039,7 +55346,7 @@
 
 
 
-  <h5 id=sequential-link-types><span class=secno>4.12.4.16 </span>Sequential link types</h5>
+  <h5 id=sequential-link-types><span class=secno>4.12.5.16 </span>Sequential link types</h5>
 
   <p>Some documents form part of a sequence of documents.</p>
 
@@ -55051,7 +55358,7 @@
   <p>A document may be part of multiple sequences.</p>
 
 
-  <h6 id=link-type-next><span class=secno>4.12.4.16.1 </span>Link type "<dfn title=rel-next><code>next</code></dfn>"</h6>
+  <h6 id=link-type-next><span class=secno>4.12.5.16.1 </span>Link type "<dfn title=rel-next><code>next</code></dfn>"</h6>
 
   <p>The <code title=rel-next><a href=#link-type-next>next</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -55062,7 +55369,7 @@
   document that is the next logical document in the sequence.</p>
 
 
-  <h6 id=link-type-prev><span class=secno>4.12.4.16.2 </span>Link type "<dfn title=rel-prev><code>prev</code></dfn>"</h6>
+  <h6 id=link-type-prev><span class=secno>4.12.5.16.2 </span>Link type "<dfn title=rel-prev><code>prev</code></dfn>"</h6>
 
   <p>The <code title=rel-prev><a href=#link-type-prev>prev</a></code> keyword may be used with
   <code><a href=#the-link-element>link</a></code>, <code><a href=#the-a-element>a</a></code>, and <code><a href=#the-area-element>area</a></code>
@@ -55081,7 +55388,7 @@
   </div>
 
 
-  <h5 id=other-link-types><span class=secno>4.12.4.17 </span>Other link types</h5>
+  <h5 id=other-link-types><span class=secno>4.12.5.17 </span>Other link types</h5>
 
   <!-- XXX should update this section to more closely match the wiki -->
   <!-- possibly also applying the principles described here:
@@ -64090,21 +64397,33 @@
 
    </li>
 
-   <li><p>If the document's out-of-band metadata (e.g. HTTP headers),
-   not counting any <a href=#content-type title=Content-Type>type information</a>
-   (such as the Content-Type HTTP header), requires some sort of
-   processing that will not affect the browsing context, then perform
-   that processing and abort these steps.</p>
+   <li>
 
-   <div class=note>
-    <p>Such processing might be triggered by, amongst other things, the
-    following:</p>
-    <ul class=brief><li>HTTP status codes (e.g. 204 No Content or 205 Reset Content)</li>
-     <li>HTTP Content-Disposition headers</li>
-     <li>Network errors</li>
-    </ul></div>
+    <p>If the document's out-of-band metadata (e.g. HTTP headers), not
+    counting any <a href=#content-type title=Content-Type>type information</a>
+    (such as the Content-Type HTTP header), requires some sort of
+    processing that will not affect the browsing context, then perform
+    that processing and abort these steps.</p>
 
-    <!-- theorectically, HTTP 205 processing would occur here,
+    <div class=note>
+     <p>Such processing might be triggered by, amongst other things, the
+     following:</p>
+     <ul class=brief><li>HTTP status codes (e.g. 204 No Content or 205 Reset Content)</li>
+      <li>Network errors (e.g. the network interface being unavailable)</li>
+      <li>Cryptographic protocol failures (e.g. an incorrect TLS certificate)</li>
+      <!-- Other schemes are handled earlier -->
+      <!-- Content-Disposition is handled below -->
+      <!-- Content-Type is handled in subsequent steps -->
+      <!-- ...and I can't think of any others. -->
+     </ul></div>
+
+<!--DOWNLOAD-->
+    <p>Responses with HTTP <code title=http-content-disposition>Content-Disposition</code>
+    headers specifying the <code title="">attachment</code>
+    disposition type must be handled <a href=#as-a-download>as a download</a>.</p>
+<!--DOWNLOAD-->
+
+    <!-- theoretically, HTTP 205 processing would occur here,
     resetting all forms with no other effect. However, it seems nobody
     actually wants to use this ability, so requiring it here seems
     like unnecessary work. -->
@@ -93056,9 +93375,10 @@
      <td><a href=#global-attributes title="global attributes">globals</a>;
          <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>;
          <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+         <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>;
          <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
          <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>;
          <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>;
          <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>;
@@ -93092,9 +93412,10 @@
          <code title=attr-area-shape><a href=#attr-area-shape>shape</a></code>;
          <code title=attr-hyperlink-href><a href=#attr-hyperlink-href>href</a></code>;
          <code title=attr-hyperlink-target><a href=#attr-hyperlink-target>target</a></code>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
+         <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>download</a></code>;
          <code title=attr-hyperlink-ping><a href=#ping>ping</a></code>;
-<!--PING-->
+<!--DOWNLOAD--><!--PING-->
          <code title=attr-hyperlink-rel><a href=#attr-hyperlink-rel>rel</a></code>;
          <code title=attr-hyperlink-media><a href=#attr-hyperlink-media>media</a></code>;
          <code title=attr-hyperlink-hreflang><a href=#attr-hyperlink-hreflang>hreflang</a></code>;
@@ -94693,6 +95014,13 @@
           <code title=attr-fe-disabled><a href=#attr-fe-disabled>textarea</a></code>
      <td> Whether the form control is disabled
      <td> <a href=#boolean-attribute>Boolean attribute</a>
+<!--DOWNLOAD-->
+    <tr><th> <code title="">download</code>
+     <td> <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>a</a></code>;
+          <code title=attr-hyperlink-download><a href=#attr-hyperlink-download>area</a></code>
+     <td> Whether to download the resource instead of navigating to it, and its filename if so
+     <td> Text
+<!--DOWNLOAD-->
     <tr><th> <code title="">draggable</code>
      <td> <a href=#the-draggable-attribute title=attr-draggable>HTML elements</a>
      <td> Whether the element is draggable
@@ -96487,6 +96815,9 @@
    <dd><cite><a href=http://tools.ietf.org/html/rfc2119>Key words for use in
    RFCs to Indicate Requirement Levels</a></cite>, S. Bradner. IETF.</dd>
 
+   <dt id=refsRFC2183>[RFC2183]</dt>
+   <dd><cite><a href=http://tools.ietf.org/html/rfc2183>Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</a></cite>, R. Troost, S. Dorner, K. Moore. IETF.</dd>
+
    <dt id=refsRFC2237>[RFC2237]</dt>
    <dd><cite><a href=http://tools.ietf.org/html/rfc2237>Japanese Character
    Encoding for Internet Messages</a></cite>, K. Tamaru. IETF.</dd>

Modified: source
===================================================================
--- source	2011-07-20 22:28:31 UTC (rev 6317)
+++ source	2011-07-22 07:01:41 UTC (rev 6318)
@@ -228,7 +228,7 @@
 
   <ul>
    <li>The <code>PeerConnection</code> API and related video-conferencing features.</li> <!--PEERCONNECTION-->
-   <li>The <code title="attr-hyperlink-ping">ping</code> attribute and related <span>hyperlink auditing</span> features.</li> <!--PING-->
+   <li>New hyperlink features: the <code title="attr-hyperlink-download">download</code> attribute to make download links and the <code title="attr-hyperlink-ping">ping</code> attribute for <span>hyperlink auditing</span>.</li> <!--DOWNLOAD--><!--PING-->
    <li>The <span>WebVTT</span> format and some <span>text track</span> API features.</li> <!--TTVTT-->
    <li>Rules for <a href="#atom">converting HTML to Atom</a>.</li> <!--MD-->
    <li>The <code title="dom-document-cssElementMap">cssElementMap</code> feature for defining <span title="CSS element reference identifier">CSS element reference identifiers</span>.</li> <!--CSSREF-->
@@ -21322,9 +21322,10 @@
    <dd><span>Global attributes</span></dd>
    <dd><code title="attr-hyperlink-href">href</code></dd>
    <dd><code title="attr-hyperlink-target">target</code></dd>
-<!--END w3c-html--><!--PING-->
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+   <dd><code title="attr-hyperlink-download">download</code></dd>
    <dd><code title="attr-hyperlink-ping">ping</code></dd>
-<!--START w3c-html--><!--PING-->
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
    <dd><code title="attr-hyperlink-rel">rel</code></dd>
    <dd><code title="attr-hyperlink-media">media</code></dd>
    <dd><code title="attr-hyperlink-hreflang">hreflang</code></dd>
@@ -21334,9 +21335,10 @@
 <pre class="idl">interface <dfn>HTMLAnchorElement</dfn> : <span>HTMLElement</span> {
   stringifier attribute DOMString <span title="dom-a-href">href</span>;
            attribute DOMString <span title="dom-a-target">target</span>;
-<!--END w3c-html--><!--PING-->
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+           attribute DOMString <span title="dom-a-download">download</span>;
            attribute DOMString <span title="dom-a-ping">ping</span>;
-<!--START w3c-html--><!--PING-->
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
            attribute DOMString <span title="dom-a-rel">rel</span>;
   readonly attribute <span>DOMTokenList</span> <span title="dom-a-relList">relList</span>;
            attribute DOMString <span title="dom-a-media">media</span>;
@@ -21374,9 +21376,10 @@
   otherwise have been placed, if it had been relevant.</p>
 
   <p>The <code title="attr-hyperlink-target">target</code>,
-<!--END w3c-html--><!--PING-->
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+  <code title="attr-hyperlink-download">download</code>,
   <code title="attr-hyperlink-ping">ping</code>,
-<!--START w3c-html--><!--PING-->
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
   <code title="attr-hyperlink-rel">rel</code>, <code
   title="attr-hyperlink-media">media</code>, <code
   title="attr-hyperlink-hreflang">hreflang</code>, and <code
@@ -21400,14 +21403,18 @@
 
   <div class="impl">
 
-  <p>The <code title="attr-hyperlink-href">href</code>, <code
-  title="attr-hyperlink-target">target</code>
-<!--END w3c-html--><!--PING-->
-  and <code title="attr-hyperlink-ping">ping</code>
-<!--START w3c-html--><!--PING-->
-  attributes affect what
-  happens when users <span title="following hyperlinks">follow
-  hyperlinks</span> created using the <code>a</code> element.  The
+  <p>The <code title="attr-hyperlink-href">href</code>,
+  <code title="attr-hyperlink-target">target</code>,
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+  <code title="attr-hyperlink-download">download</code>, and
+  <code title="attr-hyperlink-ping">ping</code>
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
+  attributes affect what happens when users <span title="following
+  hyperlinks">follow hyperlinks</span>
+<!--END w3c-html--><!--DOWNLOAD-->
+  or <span title="downloading hyperlinks">download hyperlinks</span>
+<!--START w3c-html--><!--DOWNLOAD-->
+  created using the <code>a</code> element.  The
   <code title="attr-hyperlink-rel">rel</code>, <code
   title="attr-hyperlink-media">media</code>, <code
   title="attr-hyperlink-hreflang">hreflang</code>, and <code
@@ -21424,7 +21431,10 @@
    <li><p>If the <code title="event-click">click</code> event in
    question is not <span title="concept-events-trusted">trusted</span>
    (i.e. a <code title="dom-click">click()</code> method call was the
-   reason for the event being dispatched), and the <code>a</code>
+   reason for the event being dispatched), and either the <code>a</code>
+<!--END w3c-html--><!--DOWNLOAD-->
+   element has a <code title="attr-hyperlink-download">download</code> attribute or the
+<!--START w3c-html--><!--DOWNLOAD-->
    element's <code title="attr-hyperlink-target">target</code>
    attribute is present and applying <span>the rules for choosing a
    browsing context given a browsing context name</span>, using the
@@ -21468,10 +21478,17 @@
    </li>
 
    <li><p>Finally, the user agent must <span title="following
-   hyperlinks">follow the hyperlink</span> created by the
-   <code>a</code> element. If the steps above defined a <var>hyperlink
-   suffix</var>, then take that into account when following the
-   hyperlink.</p></li>
+   hyperlinks">follow the hyperlink</span>
+<!--END w3c-html--><!--DOWNLOAD-->
+   or <span title="downloading hyperlinks">download the hyperlink</span>
+<!--START w3c-html--><!--DOWNLOAD-->
+   created by the <code>a</code> element, as determined by
+<!--END w3c-html--><!--DOWNLOAD-->
+   the <code title="attr-hyperlink-download">download</code> attribute and
+<!--START w3c-html--><!--DOWNLOAD-->
+   any expressed user preference. If the steps above defined a
+   <var>hyperlink suffix</var>, then take that into account when
+   following or downloading the hyperlink.</p></li>
 
   </ol>
 
@@ -21491,11 +21508,12 @@
 
   <div class="impl">
 
-  <p>The IDL attributes <dfn
-  title="dom-a-href"><code>href</code></dfn>,
-<!--END w3c-html--><!--PING-->
+  <p>The IDL attributes
+  <dfn title="dom-a-href"><code>href</code></dfn>,
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+  <dfn title="dom-a-download"><code>download</code></dfn>,
   <dfn title="dom-a-ping"><code>ping</code></dfn>,
-<!--START w3c-html--><!--PING-->
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
   <dfn title="dom-a-target"><code>target</code></dfn>, <dfn
   title="dom-a-rel"><code>rel</code></dfn>, <dfn
   title="dom-a-media"><code>media</code></dfn>, <dfn
@@ -42530,9 +42548,10 @@
    <dd><code title="attr-area-shape">shape</code></dd>
    <dd><code title="attr-hyperlink-href">href</code></dd>
    <dd><code title="attr-hyperlink-target">target</code></dd>
-<!--END w3c-html--><!--PING-->
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+   <dd><code title="attr-hyperlink-download">download</code></dd>
    <dd><code title="attr-hyperlink-ping">ping</code></dd>
-<!--START w3c-html--><!--PING-->
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
    <dd><code title="attr-hyperlink-rel">rel</code></dd>
    <dd><code title="attr-hyperlink-media">media</code></dd>
    <dd><code title="attr-hyperlink-hreflang">hreflang</code></dd>
@@ -42545,9 +42564,10 @@
            attribute DOMString <span title="dom-area-shape">shape</span>;
   stringifier attribute DOMString <span title="dom-area-href">href</span>;
            attribute DOMString <span title="dom-area-target">target</span>;
-<!--END w3c-html--><!--PING-->
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+           attribute DOMString <span title="dom-area-download">download</span>;
            attribute DOMString <span title="dom-area-ping">ping</span>;
-<!--START w3c-html--><!--PING-->
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
            attribute DOMString <span title="dom-area-rel">rel</span>;
   readonly attribute <span>DOMTokenList</span> <span title="dom-area-relList">relList</span>;
            attribute DOMString <span title="dom-area-media">media</span>;
@@ -42689,15 +42709,20 @@
   <div class="impl">
 
   <p>When user agents allow users to <span title="following
-  hyperlinks">follow hyperlinks</span> created using the
-  <code>area</code> element, as described in the next section, the
+  hyperlinks">follow hyperlinks</span>
+<!--END w3c-html--><!--DOWNLOAD-->
+  or <span title="downloading hyperlinks">download hyperlinks</span>
+<!--START w3c-html--><!--DOWNLOAD-->
+  created using the <code>area</code> element, as described in the
+  next section, the
   <code title="attr-hyperlink-href">href</code>,
-  <code title="attr-hyperlink-target">target</code>
-<!--END w3c-html--><!--PING-->
-  and <code title="attr-hyperlink-ping">ping</code>
-<!--START w3c-html--><!--PING-->
-  attributes decide how the
-  link is followed. The <code title="attr-hyperlink-rel">rel</code>,
+  <code title="attr-hyperlink-target">target</code>,
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+  <code title="attr-hyperlink-download">download</code>, and
+  <code title="attr-hyperlink-ping">ping</code>
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
+  attributes decide how the link is followed.
+  The <code title="attr-hyperlink-rel">rel</code>,
   <code title="attr-hyperlink-media">media</code>, <code
   title="attr-hyperlink-hreflang">hreflang</code>, and <code
   title="attr-hyperlink-type">type</code> attributes may be used to
@@ -42707,9 +42732,10 @@
   </div>
 
   <p>The <code title="attr-hyperlink-target">target</code>,
-<!--END w3c-html--><!--PING-->
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+  <code title="attr-hyperlink-download">download</code>,
   <code title="attr-hyperlink-ping">ping</code>,
-<!--START w3c-html--><!--PING-->
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
   <code title="attr-hyperlink-rel">rel</code>, <code
   title="attr-hyperlink-media">media</code>, <code
   title="attr-hyperlink-hreflang">hreflang</code>, and <code
@@ -42728,6 +42754,9 @@
    question is not <span title="concept-events-trusted">trusted</span>
    (i.e. a <code title="dom-click">click()</code> method call was the
    reason for the event being dispatched), and the <code>area</code>
+<!--END w3c-html--><!--DOWNLOAD-->
+   element has a <code title="attr-hyperlink-download">download</code> attribute or the
+<!--START w3c-html--><!--DOWNLOAD-->
    element's <code title="attr-hyperlink-target">target</code>
    attribute is present and applying <span>the rules for choosing a
    browsing context given a browsing context name</span>, using the
@@ -42737,9 +42766,16 @@
    <code>INVALID_ACCESS_ERR</code> exception and abort these
    steps.</p></li>
 
-   <li>Otherwise, the user agent must <span title="following
-   hyperlinks">follow the hyperlink</span> created by the
-   <code>area</code> element, if any.</li>
+   <li><p>Otherwise, the user agent must <span title="following
+   hyperlinks">follow the hyperlink</span>
+<!--END w3c-html--><!--DOWNLOAD-->
+   or <span title="downloading hyperlinks">download the hyperlink</span>
+<!--START w3c-html--><!--DOWNLOAD-->
+   created by the <code>area</code> element, if any, and as determined by
+<!--END w3c-html--><!--DOWNLOAD-->
+   the <code title="attr-hyperlink-download">download</code> attribute and
+<!--START w3c-html--><!--DOWNLOAD-->
+   any expressed user preference.</p></li>
 
   </ol>
 
@@ -42748,9 +42784,10 @@
   title="dom-area-coords"><code>coords</code></dfn>, <dfn
   title="dom-area-href"><code>href</code></dfn>, <dfn
   title="dom-area-target"><code>target</code></dfn>,
-<!--END w3c-html--><!--PING-->
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+  <dfn title="dom-area-download"><code>download</code></dfn>,
   <dfn title="dom-area-ping"><code>ping</code></dfn>,
-<!--START w3c-html--><!--PING-->
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
   <dfn title="dom-area-rel"><code>rel</code></dfn>, <dfn
   title="dom-area-media"><code>media</code></dfn>, <dfn
   title="dom-area-hreflang"><code>hreflang</code></dfn>, and <dfn
@@ -61118,7 +61155,40 @@
   context</span> that will be used. <span class="impl">User agents use
   this name when <span>following hyperlinks</span>.</span></p>
 
-<!--END w3c-html--><!--PING-->
+<!--END w3c-html--><!--DOWNLOAD-->
+  <p>When an <code>a</code> or <code>area</code> element's
+  <span>activation behavior</span> is invoked, the user agent may
+  allow the user to indicate a preference regarding whether the
+  hyperlink is to be used for <span title="navigate">navigation</span>
+  or whether the resource it specifies is to be downloaded.</p>
+
+  <p>In the absence of a user preference, the default should be
+  navigation if the element has no <code
+  title="attr-hyperlink-download">download</code> attribute, and
+  should be to download the specified resource if it does.</p>
+
+  <p>Whether determined by the user's preferences or via the presence
+  or absence of the attribute, if the decision is to use the hyperlink
+  for <span title="navigate">navigation</span> then the user agent
+  must <span title="following hyperlinks">follow the hyperlink</span>,
+  and if the decision is to use the hyperlink to download a resource,
+  the user agent must <span title="downloading hyperlinks">download
+  the hyperlink</span>. These terms are defined in subsequent sections
+  below.</p>
+
+  <p>The <dfn
+  title="attr-hyperlink-download"><code>download</code></dfn>
+  attribute, if present, indicates that the author intends the
+  hyperlink to be used for downloading a resource. The attribute may
+  have a value; the value, if any, specifies the default filename that
+  the author recommends for use in labeling the resource in a local
+  file system. There are no restrictions on allowed values, but
+  authors are cautioned that most file systems have limitations with
+  regard to what punctuation is supported in file names, and user
+  agents are likely to adjust file names accordingly.</p>
+<!--DOWNLOAD-->
+
+<!--PING-->
   <p>The <dfn id="ping"
   title="attr-hyperlink-ping"><code>ping</code></dfn> attribute, if
   present, gives the URLs of the resources that are interested in
@@ -61240,9 +61310,284 @@
   </div>
 
 
-<!--END w3c-html--><!--PING-->
+<!--END w3c-html--><!--DOWNLOAD-->
+
+  <h4>Downloading resources</h4>
+
+  <p>In some cases, resources are intended for later use rather than
+  immediate viewing. To indicate that a resource is intended to be
+  downloaded for use later, rather than immediately used, the <code
+  title="attr-hyperlink-download">download</code> attribute can be
+  specified on the <code>a</code> or <code>area</code> element that
+  creates the <span>hyperlink</span> to that resource.</p>
+
+  <p>The attribute can furthermore be given a value, to specify the
+  filename that user agents are to use when storing the resource in a
+  file system. This value can be overridden by the <code
+  title="http-content-disposition">Content-Disposition</code> HTTP
+  header's <code title="">filename</code> parameter. <a
+  href="#refsRFC2183">[RFC2183]</a></p>
+
+  <p>In cross-origin situations, the <code
+  title="attr-hyperlink-download">download</code> attribute has to be
+  combined with the <code
+  title="http-content-disposition">Content-Disposition</code> HTTP
+  header, specifically with the <code title="">attachment</code>
+  disposition type, to avoid the user being warned of possibly
+  nefarious activity. (This is to protect users from being made to
+  download sensitive personal or confidential information without
+  their full understanding.)</p>
+
   <div class="impl">
 
+  <hr>
+
+  <p>When a user <dfn title="downloading hyperlinks">downloads a
+  hyperlink</dfn> created by an element, the user agent must run the
+  following steps:</p>
+
+  <ol>
+
+   <li><p><span title="resolve a url">Resolve</span> the
+   <span>URL</span> given by the <code
+   title="attr-hyperlink-href">href</code> attribute of that element,
+   relative to that element.</p></li>
+
+   <li><p>If <span title="resolve a url">resolving</span> the
+   <span>URL</span> fails, the user agent may report the error to the
+   user in a user-agent-specific manner, may
+   <span>navigate</span><!--DONAV download error--> to an error page
+   to report the error, or may ignore the error and do nothing. In
+   either case, the user agent must abort these steps.</p>
+
+   <li><p>Otherwise, let <var title="">URL</var> be the resulting
+   <span>absolute URL</span>.</p></li>
+
+   <li><p>In the case of server-side image maps, append the
+   <var>hyperlink suffix</var> to <var title="">URL</var>.</p></li>
+
+   <li><p>Return to whatever algorithm invoked these steps and continue
+   these steps asynchronously.</p></li>
+
+   <li><p><span>Fetch</span> <var title="">URL</var> and handle the
+   resulting resource <span>as a download</span>.</p></li> <!--
+   http-origin privacy sensitive -->
+
+  </ol>
+
+  <p>When a user agent is to handle a resource obtained from a
+  <span>fetch</span> algorithm <dfn>as a download</dfn>, it should
+  provide the user with a way to save the resource for later use, if a
+  resource is successfully obtained; or otherwise should report any
+  problems downloading the file to the user.</p>
+
+  <p>If the user agent needs a file name for a resource being handled
+  <span>as a download</span>, it should select one using the following
+  algorithm.</p>
+
+  <p class="warning">This algorithm is intended to mitigate security
+  dangers involved in downloading files from untrusted sites, and user
+  agents are strongly recommended to follow it.</p> <!-- but it's
+  optional, since it's not really an interoperability issue -->
+
+  <ol>
+
+   <li><p>Let <var title="">filename</var> be the void value.</p></li>
+
+   <li><p>If the resource has a <code
+   title="http-content-disposition">Content-Disposition</code> header,      <!-- Content-Disposition: attachment; filename="" is always honoured, even cross-origin -->
+   that header specifies the <code title="">attachment</code>
+   disposition type, and the header includes a <code
+   title="">filename</code> parameter, then let <var
+   title="">filename</var> have that value, and jump to the step
+   labeled "sanitize" below. <a href="#refsRFC2183">[RFC2183]</a></p></li>
+
+   <li><p>Let <var title="">resource origin</var> be the
+   <span>origin</span> of the resource being downloaded.</p></li>
+
+   <li><p>Let <var title="">interface origin</var> be the
+   <span>origin</span> of the <code>Document</code> in which the <span
+   title="downloading hyperlinks">download</span> or
+   <span>navigate</span> action resulting in the download was
+   initiated, if any.</p></li>
+
+   <li><p>If there is no <var title="">interface origin</var>, then
+   let <var title="">trusted operation</var> be true. Otherwise, let
+   <var title="">trusted operation</var> be true if <var
+   title="">resource origin</var> is the <span>same origin</span> as
+   <var title="">interface origin</var>, and false otherwise.</p></li>
+
+   <li><p>If <var title="">trusted operation</var> is true and the          <!-- Content-Disposition: *; filename="" overrides download="" for same-origin -->
+   resource has a <code
+   title="http-content-disposition">Content-Disposition</code> header
+   and that header includes a <code title="">filename</code>
+   parameter, then let <var title="">filename</var> have that value,
+   and jump to the step labeled "sanitize" below. <a href="#refsRFC2183">[RFC2183]</a></p></li>
+
+   <li><p>If the download was not initiated from a
+   <span>hyperlink</span> created by an <code>a</code> or
+   <code>area</code> element, or if the element of the
+   <span>hyperlink</span> from which it was initiated did not have a
+   <code title="attr-hyperlink-download">download</code> attribute
+   when the download was initiated, or if there was such an attribute
+   but its value when the download was initiated was the empty string,
+   then jump to the step labeled <i>no proposed filename</i>.</p></li>
+
+   <li><p>Let <var title="">proposed filename</var> have the value of
+   the <code title="attr-hyperlink-download">download</code> attribute
+   of the element of the <span>hyperlink</span> that initiated the
+   download at the time the download was initiated.</p></li>
+
+   <li><p>If <var title="">trusted operation</var> is true, let <var
+   title="">filename</var> have the value of <var title="">proposed
+   filename</var>, and jump to the step labeled "sanitize"                  <!-- download="" works for all links when same-origin -->
+   below.</p></li>                                                          <!-- it is not used cross-origin, though, even for explicit user gestures -->
+                                                                            <!-- except: -->
+   <li><p>If the resource has a <code
+   title="http-content-disposition">Content-Disposition</code> header       <!-- Content-Disposition: attachment with no filename="" allows download="" cross-origin -->
+   and that header specifies the <code title="">attachment</code>
+   disposition type, let <var title="">filename</var> have the value
+   of <var title="">proposed filename</var>, and jump to the step
+   labeled "sanitize" below. <a href="#refsRFC2183">[RFC2183]</a></p></li>
+
+   <li><p><i>No proposed filename</i>: If <var title="">trusted             <!-- fallback for same-origin resources or explicit downloads: use the resource's file name -->
+   operation</var> is true, or if the user indicated a preference for
+   having the resource in question downloaded, let <var
+   title="">filename</var> have a value derived from the
+   <span>URL</span> of the resource in a user-agent-defined manner,
+   and jump to the step labeled "sanitize" below.</p></li>
+
+   <li>
+
+    <p>Act in a user-agent-defined manner to safeguard the user from a      <!-- no C-D: a header on cross-origin raises red flags -->
+    potentially hostile cross-origin download. If the download is not
+    to be aborted, then let <var title="">filename</var> be set to the
+    user's preferred file name or to a file name selected by the user
+    agent, and jump to the step labeled "sanitize" below.</p>
+
+    <div class="warning">
+
+     <p>If the algorithm reaches this step, then a download was begun
+     from a different origin than the resource being downloaded, and
+     the origin did not mark the file as suitable for downloading, and
+     the download was not initiated by the user. This could be because
+     a <code title="attr-hyperlink-download">download</code> attribute
+     was used to trigger the download, or because the resource in
+     question is not of a type that the user agent supports.</p>
+
+     <p>This could be dangerous, because, for instance, a hostile
+     server could be trying to get a user to unknowingly download
+     private information and then re-upload it to the hostile server,
+     by tricking the user into thinking the data is from the hostile
+     server.</p>
+
+     <p>Thus, it is in the user's interests that the user be somehow
+     notified that the resource in question comes from quite a
+     different source, and to prevent confusion, any suggested
+     filename from the potentially hostile <var title="">interface
+     origin</var> should be ignored.</p>
+
+    </div>
+
+   </li>
+
+   <li><p><i>Sanitize</i>: Optionally, allow the user to influence <var
+   title="">filename</var>. For example, a user agent could prompt the
+   user for a file name, potentially providing the value of <var
+   title="">filename</var> as determined above as a default
+   value.</p></li>
+
+   <li>
+
+    <p>Adjust <var title="">filename</var> to be suitable for the
+    local file system.</p>
+
+    <p class="example">For example, this could involve removing
+    characters that are not legal in file names, or trimming leading
+    and trailing white space.</p>
+
+   </li>
+
+   <li><p>If the platform conventions do not in any way use <span
+   title="concept-extension">extensions</span> to determine the types
+   of file on the file system, then return <var
+   title="">filename</var> as the file name and abort these
+   steps.</p></li>
+
+   <li><p>Let <var title="">claimed type</var> be the type given by
+   the resource's <span title="Content-Type">Content-Type
+   metadata</span>, if any is known. Let <var title="">named
+   type</var> be the type given by <var title="">filename</var>'s
+   <span title="concept-extension">extension</span>, if any is known.
+   For the purposes of this step, a <i>type</i> is a mapping of a
+   <span>MIME type</span> to an <span
+   title="concept-extension">extension</span>.</p></li>
+
+   <li><p>If <var title="">named type</var> is consistent with the
+   user's preferences (e.g. because the value of <var
+   title="">filename</var> was determined by prompting the user), then
+   return <var title="">filename</var> as the file name and abort
+   these steps.</p></li>
+
+   <li><p>If <var title="">claimed type</var> and <var title="">named
+   type</var> are the same type (i.e. the type given by the resource's
+   <span title="Content-Type">Content-Type metadata</span> is
+   consistent with the type given by <var title="">filename</var>'s
+   <span title="concept-extension">extension</span>), then return <var
+   title="">filename</var> as the file name and abort these
+   steps.</p></li>
+
+   <li>
+
+    <p>If the <var title="">claimed type</var> is known, then alter
+    <var title="">filename</var> to add an <span
+    title="concept-extension">extension</span> corresponding to <var
+    title="">claimed type</var>.</p>
+
+    <p>Otherwise, if <var title="">named type</var> is known to be
+    potentially dangerous (e.g. it will be treated by the platform
+    conventions as a native executable, shell script, HTML
+    application, or executable-macro-capable document) then optionally
+    alter <var title="">filename</var> to add a known-safe <span
+    title="concept-extension">extension</span> (e.g. "<code
+    title="">.txt</code>").</p>
+
+    <p class="note">This last step would make it impossible to
+    download executables, which might not be desireable. As always,
+    implementors are forced to balance security and usability in this
+    matter.</p>
+
+   </li>
+
+   <li><p>Return <var title="">filename</var> as the file
+   name.</p></li>
+
+  </ol>
+
+  <p>For the purposes of this algorithm, a file <dfn
+  title="concept-extension">extension</dfn> consists of any part of
+  the file name that platform conventions dictate will be used for
+  identifying the type of the file. For example, many operating
+  systems use the part of the file name following the last dot ("<code
+  title="">.</code>") in the file name to determine the type of the
+  file, and from that the manner in which the file is to be opened or
+  executed.</p>
+
+  <p>User agents should ignore any directory or path information
+  provided by the resource itself, its <span>URL</span>, and any <code
+  title="attr-hyperlink-download">download</code> attribute, in
+  deciding where to store the resulting file in the user's file
+  system.</p>
+
+  </div>
+
+<!--DOWNLOAD-->
+
+
+<!--PING-->
+
+  <div class="impl">
+
   <h5><dfn>Hyperlink auditing</dfn></h5>
 
   <p>If a <span>hyperlink</span> created by an <code>a</code> or
@@ -72988,23 +73333,36 @@
 
    </li>
 
-   <li><p>If the document's out-of-band metadata (e.g. HTTP headers),
-   not counting any <span title="Content-Type">type information</span>
-   (such as the Content-Type HTTP header), requires some sort of
-   processing that will not affect the browsing context, then perform
-   that processing and abort these steps.</p>
+   <li>
 
-   <div class="note">
-    <p>Such processing might be triggered by, amongst other things, the
-    following:</p>
-    <ul class="brief">
-     <li>HTTP status codes (e.g. 204 No Content or 205 Reset Content)</li>
-     <li>HTTP Content-Disposition headers</li>
-     <li>Network errors</li>
-    </ul>
-   </div>
+    <p>If the document's out-of-band metadata (e.g. HTTP headers), not
+    counting any <span title="Content-Type">type information</span>
+    (such as the Content-Type HTTP header), requires some sort of
+    processing that will not affect the browsing context, then perform
+    that processing and abort these steps.</p>
 
-    <!-- theorectically, HTTP 205 processing would occur here,
+    <div class="note">
+     <p>Such processing might be triggered by, amongst other things, the
+     following:</p>
+     <ul class="brief">
+      <li>HTTP status codes (e.g. 204 No Content or 205 Reset Content)</li>
+      <li>Network errors (e.g. the network interface being unavailable)</li>
+      <li>Cryptographic protocol failures (e.g. an incorrect TLS certificate)</li>
+      <!-- Other schemes are handled earlier -->
+      <!-- Content-Disposition is handled below -->
+      <!-- Content-Type is handled in subsequent steps -->
+      <!-- ...and I can't think of any others. -->
+     </ul>
+    </div>
+
+<!--END w3c-html--><!--DOWNLOAD-->
+    <p>Responses with HTTP <code
+    title="http-content-disposition">Content-Disposition</code>
+    headers specifying the <code title="">attachment</code>
+    disposition type must be handled <span>as a download</span>.</p>
+<!--START w3c-html--><!--DOWNLOAD-->
+
+    <!-- theoretically, HTTP 205 processing would occur here,
     resetting all forms with no other effect. However, it seems nobody
     actually wants to use this ability, so requiring it here seems
     like unnecessary work. -->
@@ -110675,9 +111033,10 @@
      <td><span title="global attributes">globals</span>;
          <code title="attr-hyperlink-href">href</code>;
          <code title="attr-hyperlink-target">target</code>;
-<!--END w3c-html--><!--PING-->
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+         <code title="attr-hyperlink-download">download</code>;
          <code title="attr-hyperlink-ping">ping</code>;
-<!--START w3c-html--><!--PING-->
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
          <code title="attr-hyperlink-rel">rel</code>;
          <code title="attr-hyperlink-media">media</code>;
          <code title="attr-hyperlink-hreflang">hreflang</code>;
@@ -110720,9 +111079,10 @@
          <code title="attr-area-shape">shape</code>;
          <code title="attr-hyperlink-href">href</code>;
          <code title="attr-hyperlink-target">target</code>;
-<!--END w3c-html--><!--PING-->
+<!--END w3c-html--><!--DOWNLOAD--><!--PING-->
+         <code title="attr-hyperlink-download">download</code>;
          <code title="attr-hyperlink-ping">ping</code>;
-<!--START w3c-html--><!--PING-->
+<!--START w3c-html--><!--DOWNLOAD--><!--PING-->
          <code title="attr-hyperlink-rel">rel</code>;
          <code title="attr-hyperlink-media">media</code>;
          <code title="attr-hyperlink-hreflang">hreflang</code>;
@@ -112679,7 +113039,15 @@
           <code title="attr-fe-disabled">textarea</code>
      <td> Whether the form control is disabled
      <td> <span>Boolean attribute</span>
+<!--END w3c-html--><!--DOWNLOAD-->
     <tr>
+     <th> <code title="">download</code>
+     <td> <code title="attr-hyperlink-download">a</code>;
+          <code title="attr-hyperlink-download">area</code>
+     <td> Whether to download the resource instead of navigating to it, and its filename if so
+     <td> Text
+<!--START w3c-html--><!--DOWNLOAD-->
+    <tr>
      <th> <code title="">draggable</code>
      <td> <span title="attr-draggable">HTML elements</span>
      <td> Whether the element is draggable
@@ -114926,6 +115294,9 @@
    <dd><cite><a href="http://tools.ietf.org/html/rfc2119">Key words for use in
    RFCs to Indicate Requirement Levels</a></cite>, S. Bradner. IETF.</dd>
 
+   <dt id="refsRFC2183">[RFC2183]</dt>
+   <dd><cite><a href="http://tools.ietf.org/html/rfc2183">Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field</a></cite>, R. Troost, S. Dorner, K. Moore. IETF.</dd>
+
    <dt id="refsRFC2237">[RFC2237]</dt>
    <dd><cite><a href="http://tools.ietf.org/html/rfc2237">Japanese Character
    Encoding for Internet Messages</a></cite>, K. Tamaru. IETF.</dd>




More information about the Commit-Watchers mailing list