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

Dennis Joachimsthaler dennis at efjot.de
Mon Aug 2 10:03:03 PDT 2010


Kornel Lesiński <kornel at geekhood.net> wrote:

> On 2 Aug 2010, at 17:21, Michael Kozakewich wrote:
> I agree that it's not good to force users in general. However, this  
> attribute can be implemented only as a hint for browsers to display  
> Open/Save dialog. Users wouldn't be forced to download the file, it  
> would just be easier for them to download.
>
> OTOH users may be annoyed when their browser isn't saving some types of  
> documents by default (and whether certain type of file should be viewed  
> inline or saved might depend on context, e.g., I may want to read PDF  
> booklets in the browser, but would prefer to save PDF receipts and  
> tickets).
>
> If Content-Disposition was attribute on <a>, then webmasters could  
> easily offer right option (or both) where it makes sense.
>
> Downloads can be "forced" already with Content-Disposition: attachment.  
> It's just harder to do, and unfortunately that doesn't stop webmasters  
> from trying. Popular PHP snippets for forcing download are among the  
> most disgusting cargo-cult code I've ever seen — they're collection of  
> self-contradictory and nonsensical HTTP headers, break caching and  
> resuming, and often have security vulnerabilities.
>
> It would be great if we could obsolete those scripts.
>

Thank you, this is exactly what I was trying to say. To "force" was maybe
the wrong word.



More information about the whatwg mailing list