W3C home > Mailing lists > Public > whatwg@whatwg.org > June 2011

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

From: Kornel Lesiński <kornel@geekhood.net>
Date: Sat, 04 Jun 2011 15:34:28 +0100
Message-ID: <op.vwj2rqlwte2ec8@aimac.local>
On Fri, 03 Jun 2011 14:24:21 +0100, Boris Zbarsky <bzbarsky at mit.edu> wrote:

> Think a URI like this:
>
>    http://mysite.org/generate_progress_report.php?quarter=Q12010
>
> 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.
>
> Note that some browsers will do weird parsing of the query params to  
> attempt to extract a "useful filename".  That seems strictly worse than  
> just using Content-Disposition.

FWIW, this works in Apache, although it's not a well-known trick:

http://mysite.org/generate_progress_report.php/Progress_report_of_Q1_2010.pdf?quarter=Q12010


However, It does not solve the problem of forcing the download, which I  
think is the main point of <a content-disposition>.

-- 
regards, Kornel Lesi?ski
Received on Saturday, 4 June 2011 07:34:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:06 UTC