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

Eric Uhrhane ericu at google.com
Mon Apr 11 09:48:53 PDT 2011


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
>



More information about the whatwg mailing list