[whatwg] "Content-Disposition" property for <a> tags

Am 03.06.2011, 10:23 Uhr, schrieb Eduard Pascual <herenvardo at gmail.com>:

> On Thu, Jun 2, 2011 at 10:09 PM, Dennis Joachimsthaler <dennis at efjot.de>  
> wrote:
>> By the way, another point that we have to discuss:
>>
>> Which tag should a browser favor. The one in HTTP or the other one in
>> HTML?
>
> Is that really worth discussing? HTTP >> HTML: whomever provides the
> file should have the last say about how the file needs to be served,
> regardless of what a site referencing to it may suggest.
>
> Furthermore, when links point to URIs with any scheme other than
> "http:", whatever the scheme defines about how to deliver the file
> takes precedence.
>
> Thus, only in the lack of an actual Content-Disposition header, or its
> equivalent on some other scheme, would the attribute given by the link
> be used, just like an additional fallback step before whatever the
> UA's default behaviour would be.

I agree that I shouldn't even have asked since this is actually a no-
brainer. I can't think of any good reason to overwrite the http header
with the html attribute.

Alright, so, moving on...

> This grants the ability for any content provider to use an explicit
> "Content-Disposition: inline" HTTP header to effectively block
> "download links" from arbitrary sources.

True. Is it still so that some browsers ignore the "filename" part
of a content-disposition if an "inline" disposition is used?

> Personally, on the case I'm most concerned about ("data:" URIs used
> for "Save log" and similar functionalities), there is never a "true"
> disposition header; so my use cases do not push towards any of the
> options. What I have just written is what I feel is the most
> reasonable approach (the provider of a resource should have some
> control over it above an arbitrary third party).

Data URIs would very well benefit from this attribute, in my opinion.

This would also cater to the canvas lovers. Downloading something
drawn on a canvas instantly? No problem! <a href="data:...."
disposition="attachment" filename="canvas.png">Download me!</a>

This is still one thing that has to be settled though.

a) How do we call the attribute?
b) Do we include the "filename" part directly into the attribute
    or do we create a SECOND attribute just for this?

People have been posting several formats now. But I don't think we
actually have *agreed* upon one of those.

- Dennis Joachimsthaler

Received on Friday, 3 June 2011 05:23:48 UTC