How Do I Force the Browser to Save a File

M

MattC

I work in a web based environment (Oracle 10.1.2) and have a situation
where I need to send a file to the user's client machine. I want to
make sure that when I send the file the user sees a dialog box that
asks them to save the file to disk.

Can someone explain how this is done? Is there a HTTPResponse header
field that needs to be set?

Thanks,
Matt
 
C

Chris Smith

MattC said:
I work in a web based environment (Oracle 10.1.2) and have a situation
where I need to send a file to the user's client machine. I want to
make sure that when I send the file the user sees a dialog box that
asks them to save the file to disk.

Can someone explain how this is done? Is there a HTTPResponse header
field that needs to be set?

Google for the Content-disposition header
 
O

Oliver Wong

Chris Smith said:
Google for the Content-disposition header

Pedantic point: This only "recommends" that the browser displays a save
prompt. The browser is free to ignore your recommendation and do whatever it
wants with yoru data. This (recommending, as opposed to forcing) is the best
you can do on the Internet.

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top