Richie wrote:
What I want
Perhaps unwittingly, you've made known the root of the perceived
problem already: what you want and what someone else wants aren't
necessarily one and the same.
is to have a link to a file (it could be a .zip, .exe, .jpg, .txt or
even .html) and when the user clicks on it they are prompted with the
Save As box, as opposed to it opening in the browser.
(a) What "Save As box"? My browser didn't come with one. ;-)
(b) What makes you think that you know how I ought to deal with
files?
(c) Which piece of software would you have me open an HTML file with,
if not my browser?
header("Content-type: ???/???"); not sure what to put instead of the ???
The file's media type perchance? Here's the authoritative registry
for Internet media types:
ftp://ftp.isi.edu/in-notes/iana/assi...s/media-types/
And you'll see that Content-Disposition -- a non-HTTP/1.1 header,
defined in the experimental RFC1806 -- has been put forward as a
suggestion in other followups, which have rightly warned against
sending illegitimate Content-Type headers. If your wish is to convey
presentational information, this is the logical way.
But sending this header, with a disposition type of attachment, does
*not* guarantee that a client will ask the user what she wants done
with the file; not being part of the HTTP/1.1 draft standard,
conforming applications aren't obliged to act upon Content-
Disposition headers. I reckon RFC1806's intention is *not*, without
a smidgen of a doubt, to provide servers with the mechanism to
"force" particular actions on clients. Is that not your inference
too?
--
Jock