Click to See Complete Forum and Search --> : Browser file save


jward
March 17th, 2002, 05:02 PM
Hi

I have a web page with a number of links to files (.doc, .xls, txt) and would like to force users to save them rather than view the document within the browser...obviously the right-click will give the file save option but the page currently has the right-click disabled (as the site owner didn't want access to the source code to be available).
Can anyone provide the code that will do this, please.
Many thanks
JLW

websmith99
September 27th, 2002, 01:31 AM
Basically, you have to set the Content-disposition in the HTTP
header. You would do this server-side using (depending on
your architecture) ASP or JSP for example.

Here is a very good article on this:
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q260519&

:cool: