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

Boris Zbarsky bzbarsky at MIT.EDU
Fri Jun 3 08:24:17 PDT 2011

On 6/3/11 10:39 AM, Eduard Pascual wrote:
>>   http://mysite.org/generate_progress_report.php?quarter=Q12010
> Wouldn't that default (in the absence of a Content-disposition) to
> "generate_progress_report.php" as the filename?

Depends on the browser.  But yes.  And that's a crappy filename for the 
Q12010 report!

>> When saving, it would be good to use something like "Progress report of Q1
>> 2010" as the filename.  But that's not "part of the URI" in any sense.
> It would, if the author wanted it to be. Turning that URI into
> something like "http://mysite.org/ProgressReport_Q1_2010", for example
> (that's what I'd probably do in that scenario) is quite simple to
> achieve.

Is it now?  You have to do a redirect on the server side, increase 
latency for the user, etc.  For what purpose, given that you just want 
to specify the filename and there is already a mechanism for that?

> After all, if the author cares about having a reasonable filename, why
> wouldn't they care about having a descriptive URI?

Because the URI is generated based on a form the user fills out, and no 
one ever sees the actual URI?

>> I strongly disagree.  I think browsers that use the Content-Disposition
>> filename for "attachment" but not "inline" are just buggy and should be
>> fixed.
> Ok, maybe I used a too harsh wording for that, but for all the
> situations I can think of where a filename argument would make sense I
> can achieve a better result through URI beautification.

"better" byt what metric?

>> Of course it sounds like your position is that they should not use the
>> filename for "attachment" either... (in which case you disagree not only
>> with me, but with most of the web).
> Actually, my position is more like "I don't care what the browser does
> with this because I have no need to use it".

That's great, and I'm happy you're willing to impose costs on your users 
so you don't have to use it.  But others may wish to make different 
tradeoffs here.


More information about the whatwg mailing list