[whatwg] a rel=attachment

Bjartur Thorlacius svartman95 at gmail.com
Thu Jul 14 12:35:41 PDT 2011


On 7/14/11, Ian Fette (イアンフェッティ) <ifette at google.com> wrote:
> Many websites wish to offer a file for download, even though it could
> potentially be viewed inline (take images, PDFs, or word documents as an
> example). Traditionally the only way to achieve this is to set a
> content-disposition header. *However, sometimes it is not possible for the
> page author to have control over the response headers sent by the
> server.*(A related example is offline apps, which may wish to provide
> the user with
> a way to "download" a file stored locally using the filesystem API but again
> can't set any headers.) It would be nice to provide the page author with a
> client side mechanism to trigger a download.
>
As already stated you can use rel="enclosure". Alternatively, you can
specify the type attribute with the appropriate value and let the user
agent offer to write it to permanent storage.



More information about the whatwg mailing list