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

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

From: Glenn Maynard <glenn@zewt.org>
Date: Sun, 10 Apr 2011 14:49:03 -0400
Message-ID: <BANLkTikb=6kNmZ45sKy8E9Y3EGMP2pLMaw@mail.gmail.com>
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.

Glenn Maynard
Received on Sunday, 10 April 2011 11:49:03 UTC

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