W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2011

[whatwg] a rel=attachment

From: Andy Mabbett <andy@pigsonthewing.org.uk>
Date: Thu, 14 Jul 2011 20:15:03 +0100
Message-ID: <CABiXOE=9Dy7usKGF9_j827=YGjSfCTtv_S9TtmeDj_KB_1y5gg@mail.gmail.com>
2011/7/14 Ian Fette (????????) <ifette at google.com>:
> 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.
>
> After mulling this over with some application developers who are trying to
> use this functionality, it seems like adding a "rel" attribute to the <a>
> tag would be a straightforward, minimally invasive way to address this use
> case. <a rel=attachment href=blah.pdf> would indicate that the browser
> should treat this link as if the response came with a content-disposition:
> attachment header, and offer to download/save the file for the user.

How would this be different to the already-available rel="enclosure" ?

-- 
Andy Mabbett
@pigsonthewing
http://pigsonthewing.org.uk
Received on Thursday, 14 July 2011 12:15:03 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:34 UTC