[whatwg] <a download> feedback

Another use case: fixing Google's search results.  They're currently
annoyingly broken: "save link as" on a result link in Firefox offers a
useless default filename of "url.htm".  The "filename" attribute would fix
this: set the Content-Disposition filename without affecting the
disposition type attachment vs. inline).  For example:  <a
href="/url?data=..." filename="product manual.pdf">.  That would simply set
a default "Content-Disposition: filename" field.

Setting Content-Disposition: attachment should be an attribute orthogonal
to the filename, eg. <a download>.  The attachment vs. inline mode is an
orthogonal concept to the default filename, and the "download=filename"
design loses that orthogonality, which I believe is a serious flaw.

This is also an example of why having separate "view" vs. "download" links
is bad.  Google search results shouldn't need separate "download" links to
be able to set the filename, leaving save-as on the main result links
broken.  It should work properly with a single link.

-- 
Glenn Maynard

Received on Saturday, 3 March 2012 13:30:14 UTC