[thelist] Content-Disposition filename and delayed download

Bill Moseley moseley at hank.org
Fri Dec 3 08:12:08 CST 2010


(sorry if you received a duplicate -- Gmail makes it too easy for me to
select the wrong to: address at times).

What's the recommended approach to the filename used in downloads?  I would
like to allow users to specify the filename (or, say, use an existing
user-provided name or title) which means I'd likely need to encode in utf-8.

But, I'm not sure what conclusion to draw from looking at
http://greenbytes.de/tech/tc2231/

RFC2183 says the values should be 78 characters and limited to ASCII.  2184
and then 2231 discusses encoding but it seems not well supported if I'm
reading those test correctly.

See: http://www.ietf.org/rfc/rfc2231.txt


Now, say I have to dynamically generate the download and it might take
longer than a normal web request.  In the past I've opened another window
and used a meta refresh to poll the server until the download is ready.
 Seems a bit old-school.

Can anyone point me to an example of a better approach?  I've seem
suggestions of using iframes or polling with AJAX.

I've also see suggestions that it's important to not set no-cache headers
for IE when sending the download.


I'm not quite clear if I want to send Connection: close when polling.  The
idea is I don't want to hold up a web server process when the client is
polling for the download, but the load balancer should allow for keep-alive
connection on the client side but not tie up a single web server process.


-- 
Bill Moseley
moseley at hank.org


More information about the thelist mailing list