[whatwg] Priority between <a download> and content-disposition

Jonas Sicking jonas at sicking.cc
Mon Mar 18 01:05:17 PDT 2013


On Mar 17, 2013 4:46 AM, "Julian Reschke" <julian.reschke at gmx.de> wrote:
>
> On 2013-03-17 02:49, Jonas Sicking wrote:
>>
>> It's currently unclear what to do if a page contains markup like <a
>> href="page.txt" download="A.txt"> if the resource at audio.wav
>> responds with either
>>
>> 1) Content-Disposition: inline
>> 2) Content-Disposition: inline; filename="B.txt"
>> 3) Content-Disposition: attachment; filename="B.txt"
>>
>> People generally seem to have a harder time with getting header data
>> right, than getting markup right, and so I think that in all cases we
>> should display the "save as" dialog (or display equivalent download
>> UI) and suggest the filename "A.txt".
>
>
> I agree that people have problems getting headers right, but in all the
cases above, it seems they have set the header on purpose, no?

Over in [1] we immediately ran into people wanting to override an
explicitly set header.

So no, I don't think that is accurate.

I think it is just as common to want to control a situation from markup
when you are dealing with a server that is sending a header, as when
dealing with a server that is not sending a header. At least if you account
for the number of servers setting headers.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=676619#c117

/ Jonas



More information about the whatwg mailing list