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

[whatwg] a rel=attachment

From: Glenn Maynard <glenn@zewt.org>
Date: Thu, 14 Jul 2011 18:45:35 -0400
Message-ID: <CABirCh-bOafsmhoXfTgU2ZuFVqt58zWjm4gxtUmqy4FR8FPmFA@mail.gmail.com>
On Thu, Jul 14, 2011 at 5:44 PM, Tab Atkins Jr. <jackalmage at gmail.com>wrote:

>  Optimizing for the user choosing to right-click=>Save seems like a
> much more niche case than linking to a file that should be downloaded.
>
> Plus, you could address it by just wrapping the <img> in an <a>:
>
> <a href=uglyurl.jpg download=prettyurl.jpg><img src=uglyurl.jpg></a>
>

I don't want to turn my images into links--and in some cases the images are
already links to something else, or use click for other site UI.

A similar and probably more common use case is links to files which can be
viewed usefully in the browser, and are also often saved to disk; very
frequently PDFs.  Using <a href=ugly.pdf download=pretty.pdf> would obstruct
users who want to view the link in the browser.

I don't feel very strongly about this, and download=filename is clean and
straightforward, but we should at least consider the use cases of specifying
a filename without implying C-D: attachment.

-- 
Glenn Maynard
Received on Thursday, 14 July 2011 15:45:35 UTC

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