[whatwg] a rel=attachment

Tantek Çelik tantek at cs.stanford.edu
Fri Jul 15 17:38:19 PDT 2011

Agreed with Glenn, narrowing the semantic solves this problem neatly:

* filename="" attribute - what to name the file if saved by the user (by whatever means)
* existing rel="enclosure" spec - download the link when clicked/activated.

So the author can choose to do one, or the other, or both. Clean, simple, orthogonal.

-----Original Message-----
From: Glenn Maynard <glenn at zewt.org>
Sender: whatwg-bounces at lists.whatwg.org
Date: Fri, 15 Jul 2011 19:43:45 
To: Jonas Sicking<jonas at sicking.cc>
Cc: whatwg<whatwg at whatwg.org>; Darin Fisher<darin at chromium.org>; <ifette at google.com>
Subject: Re: [whatwg] a rel=attachment

2011/7/15 Jonas Sicking <jonas at sicking.cc>

> It definitely is an interesting usecase that Glenn brought up about
> being able to specify a save-as name without otherwise modifying the
> behavior of a reference. However that seems like a much more rare
> usecase and so not the one we should optimize for.

Bear in mind that "optimize for" doesn't mean "support at all"; if
download=filename is used, it seems unlikely that there will ever be *any*
client-side way to supply the filename without implying attachment, which is
a very different thing than "not optimizing for it".

I don't feel strongly enough about this to press it further, but <a
href=ugly download filename=pretty> also seems fairly clean, and avoids
combining parameters that really are orthogonal to one another.

Glenn Maynard

More information about the whatwg mailing list