Forcing a Download

Randal L. Schwartz merlyn at stonehenge.com
Mon Aug 7 16:52:13 CDT 2000


>>>>> "Aaron" == Aaron Kilbey <kilbey at lclark.edu> writes:

Aaron> As i'm sure you all are aware, browsers are so smart that when
Aaron> an href links to a text file it displays it on the screen
Aaron> rather than giving the popup window you would see had the
Aaron> filename extension been unknown or .zip, etc..  Is there a way
Aaron> to force the browser to download a .txt file with PERL.  i can
Aaron> use "Content-type: application/octet-stream\n\n" but the name
Aaron> in the popup window is the same as the cgi, i don't know how to
Aaron> link a file on the server, and i don't know how to make the
Aaron> .txt filename show up. - Aaron

<http://www.stonehenge.com/merlyn/WebTechniques/col52.html>

Aaron> -- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
TIMTOWTDI



More information about the Pdx-pm-list mailing list