Our website contains many photos that users can retrieve. Currently they have to click on the thumbnail of their photo which opens a new browser window with their photo at full scale. Then they have to right-click -> Save as... to download.
Is it possible to tell the browser not to open the photo in the new window, but to prompt the open/save dialog when they click on the thumbnail? I'd like to do this without giving the file a wierd extension or zipping it. Is there an http header to set or am I out of luck?
Jason E. Brawner<br />Sun Certified Java Programmer<br />Sun Certified Web Component Developer
...but if I provide the appropriate content type (image/jpeg) won't the browser recognize it and display the photo rather than prompt for download? And if it did work, the user would be presented with a weird default file name (probably the servlet mapping) in the 'Save as' dialog. They'd have to be instucted to put a .jpg ext on the file before they saved it to their hard drive... too confusing for the average user.
refreshing change from the constant questions on how to PREVENT people from saving images displayed in their browsers
A good way that works is to serve the image in a format that browsers can't display. BMP and TIFF are good examples (though there's no guarantee that there are no browsers at all that can't show them of course).