in reply to Forcing a Word Document to Download

You can use the content type 'application/force-download' to tell the browser to download and save instead of displaying it inline. It is probably easier to get your web server to alter the content-type on static files then it is to write a script to do it. With Apache you could do it in a .htaccess file with ForceType or AddType.

But as is mentioned above, it is really up to the browser to decide what it wants to do with the data.

- Cees

  • Comment on Re: Forcing a Word Document to Download

Replies are listed 'Best First'.
Re: Re: Forcing a Word Document to Download
by iburrell (Chaplain) on Jul 11, 2003 at 20:10 UTC
    There is also the "Content-Disposition" header. "Content-Disposition: attachment" will cause many browsers to download the file. "Content-Disposition" isn't part of the HTTP spec but is part of MIME and is supported by Mozilla and IE.