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

[whatwg] "Content-Disposition" property for <a> tags

From: Eric Uhrhane <ericu@google.com>
Date: Mon, 11 Apr 2011 09:48:53 -0700
Message-ID: <BANLkTi=sj2XDE2uQQr7_uFA+qsZzRMqopQ@mail.gmail.com>
On Sun, Apr 10, 2011 at 11:49 AM, Glenn Maynard <glenn at zewt.org> wrote:
> On Sun, Apr 10, 2011 at 1:59 PM, Bjartur Thorlacius <svartman95 at gmail.com>wrote:
>
>> Right. As an end-user I ask: Does a web developer publishing links to
>> resources have a say as to whether I render aforementioned resource
>> immediately, write it to disk or both?
>>
>
> As far as Content-Disposition already allows us to do this, yes.
>
> Note that this doesn't allow bypassing the "open/save" dialog you see in
> most browsers. ?Content-Disposition: attachment asks the browser to show
> that dialog, when otherwise it may have displayed the content directly,
> without asking. ?(Browsers generally don't have a "show this file in the
> browser, even though it's C-D: attachment" option on that dialog--they
> should, but that's a separate issue.)
>
> ?Better yet, File API could have an API for writing blobs to files.
>>
>
> FileWriter exists (don't think anyone's implemented it yet). ?It's an
> important API, but covers a different set of use cases. ?<a download> allows
> creating a download link to any URL (not just blobs) that behave like a
> normal link, including things like the browser's standard context menu
> items. ?FileWriter doesn't do this.

Folks did propose making FileSaver do this at TPAC, but we haven't
gotten around to hashing out the details yet.  The idea was that
FileSaver would take a URL instead of a Blob, and thus could also be
used for downloading arbitrary links.

> --
> Glenn Maynard
>
Received on Monday, 11 April 2011 09:48:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT