I have a PHP script that is pased the name of a JPEG file which it then reads from outside the webroot area and spools it back out as image/jpeg data. It is to be used as the target of an <IMG> tag. Prior to spooling the JPEG data it sends the following headers:-
header("Content-Type: image/jpeg");
header("Content-Disposition: inline; filename=name_of_file.jpg");
It works fine in principle, but has twoo annoying problems.
In Netscape 4.7 and Netscape 6 when you try to save the image the image name is shown as get_image.php (the script name) and the type is set to 'All Files'. The Content-Disposition header is supposed to fix this and does so in IE4, IE5 and IE 5.5. I have tried it with attachment insetad of inline - no difference in Netscape and IE5 stops working altogether so inline looks good. Any ideas?
Secondly the images will not cache in IE5.5 whereas they do in Netscape. I would have thought tat they would cache OK as they are only URL's at the end of the day. Any ideas on this one as well?
Many thanks,
Fes.