in reply to File Download from CGI Script

print "Content-Disposition:attachment;filename=file.txt\n"; print "Content-type: application/octet-stream\n\n";

Should work on at least some recent browsers. How about also appending the filename to the script url? Something like this:

<a href="script.cgi/filename.txt?downloadid=1">download the txt file</ +a>

Any rate, these kind of tricks are not really very well supported or standard, so expect to disappoint some users.

-- Joost downtime n. The period during which a system is error-free and immune from user input.