in reply to HTML File Naming Problem

For downloadable links (not HTML pages), I've had luck with setting headers like this:     Content-Disposition: attachment; filename="xyz.gif" Keep in mind there's nothing you can do if the user shift-clicks -- it will be saved as 'my_script.pl'. As you say, the save-as dialog will pop up before it gets any of your headers.

Perhaps a cleaner way of all this is to have a ScriptAlias for my_script.pl in your apache httpd.conf. Then you can make links to /cgi-bin/my_script.pl/filename, and the browser will make a better guess in the save-as dialog.

blokhead

Replies are listed 'Best First'.
Re: Re: HTML File Naming Problem
by Anonymous Monk on Jan 21, 2003 at 16:08 UTC
    This works nicely, except with Netscape 4.x. Perhaps, it will be incentive for people to finally upgrade.