Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #17448
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Ajax Call to PHP Download.php Makes Browser Not Download, But Client Still Receives Stream |
| Date | 2012-12-04 00:48 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <k9jh9k$6m2$1@dont-email.me> (permalink) |
| References | <74b314b0-3138-4fdf-b31e-bc7c9b1dbcba@googlegroups.com> <6e5480bd-042f-4ec3-9d98-a00f64089423@googlegroups.com> |
On Mon, 03 Dec 2012 16:16:14 -0800, dman777 wrote: >> This script is for my http file server. I have my files out of web >> root, so I am using a php script to grab and send the files to the >> client. The problem is, when I click on the file to download the >> browser(ff and chrome) does not ask me if I want to save the file. In >> chrome's web tools, under network, I see that the download.php did >> execute successfully. In fact, I even see where the file was transfered >> in bytes for the request. It seems like the browser is not downloading >> the file, but the file is being sent to the browser and cached. Yes, you're fetching a response inside an ajax event .... so the response goes to the ajax code. If you want to download the response to the local hard disk on the client machine, then you should use a normal browser call, not an ajax call to launch the request that downloads the file. Rgds Denis McMahon
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
Ajax Call to PHP Download.php Makes Browser Not Download, But Client Still Receives Stream dman777 <darin.hensley@gmail.com> - 2012-12-03 16:14 -0800
Re: Ajax Call to PHP Download.php Makes Browser Not Download, But Client Still Receives Stream dman777 <darin.hensley@gmail.com> - 2012-12-03 16:16 -0800
Re: Ajax Call to PHP Download.php Makes Browser Not Download, But Client Still Receives Stream Denis McMahon <denismfmcmahon@gmail.com> - 2012-12-04 00:48 +0000
csiph-web