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

[whatwg] a rel=attachment

From: Hironori Bono <hbono@google.com>
Date: Fri, 22 Jul 2011 12:03:06 +0900
Message-ID: <CAN3JrbbUFEyGgFoFBdbXyU+472mE=_EmsJthDWkvdSUSAzVxkA@mail.gmail.com>
Greetings all,

This is just out of curiosity.
Would it be possible to give me the encoding used for this "download"
attribute? I think we have several options when we use non-ASCII
characters (this example uses Cyrillic characters) as the value of
this attribute as listed below.

1. Use the same encoding as the one used for the HTML content.
  <a href="..."  download="????.png">????????? ????</a>
(If we allow using '&#x...' format of HTML, it becomes:
  <a href="..."  download="&#x444;&#x430;&#x439;&#x43B;.png">????????? ????</a>

2. Use the URL encoding (same as the "href" attribute).
  <a href="..."  download="%D1%84%D0%B0%D0%B9%D0%BB.png">????????? ????</a>

3. Use RFC 2231 (same as the "content-disposition" header)
  <a href="..."
download="UTF-8''%D1%84%D0%B0%D0%B9%D0%BB.png">????????? ????</a>

Thank you for your help in advance.

Regards,

Hironori Bono
E-mail: hbono at google.com

On Sat, Jul 16, 2011 at 10:59 AM, Ian Fette (????????)
<ifette at google.com> wrote:
> On Fri, Jul 15, 2011 at 4:43 PM, Glenn Maynard <glenn at zewt.org> wrote:
>
>> 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.
>>
>
> I really don't see the importance of the "name the thing that isn't going to
> be downloaded" usecase; there are countless edge cases that we could concern
> ourselves with in HTML but that few users will ever hit, this is one. (I
> also suspect a user sophisticated enough to actually save something, e.g.
> right click save as, is sophisticated enough to be able to type their own
> filename.)I think it's better overall to keep the semantics as clean and
> simple as possible. I suggest we move forward with <a href=blah
> download=filename> with the origin considerations mentioned in the previous
> email and move on.
>
>
>
>
>>
>> --
>> Glenn Maynard
>>
>>
>
Received on Thursday, 21 July 2011 20:03:06 UTC

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