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

Boris Zbarsky bzbarsky at MIT.EDU
Wed May 8 09:21:02 PDT 2013


On 5/8/13 12:15 PM, Gordon P. Hemsley wrote:
> Perhaps. But maybe I'm not clear on what exactly the alternate
> proposal is. Are you suggesting not supporting the @download
> attribute? Or just ignoring it when Content-Disposition specifies a
> filename? (I would suggest that neither is the appropriate response.)

What Gecko implements right now is:

1)  @download is ignored for non-same-origin links.
2)  If Content-Disposition specifies a filename, that filename is used
     no matter what @download says.

>> This is not trivial, since sniffing can easily fail on files that are both
>> HTML and png or both HTML and exe at the same time.  There's a good bit of
>> research on things like this.
>
> Yes, and that research has already gone into creating the mimesniff
> standard, has it not? I'm suggesting use the existing algoirthm(s) in
> an additional arena, not creating a new, separate algorithm.

The mimesniff standard doesn't try to sniff for types UAs don't render 
natively, which is what would be needed here.

> True. But doesn't that imply a rejection of my aforementioned
> "reasonable argument"?

Yes, it does.  "reasonable" means it's reasonable, not that it overrides 
all other considerations...

-Boris




More information about the whatwg mailing list