Jump to content

How to know whether a file has been downloaded successfully on the client side?


astrojunky

Recommended Posts

Hello beautiful people, is it possible to know whethere a file has been downloaded successfully by the user? Does it have something to do with flush()? I guess it's possible with Ajax, but I don't have a clue which are the php functions to be used. Thanking you in advance.

 

astro

It isn't possible not even with Ajax

Ajax makes requests to server side scripts (ajax is javascript, not a language in itself). A server script has nothing to do with the download process. This is done via the users operating system. Aslo javascript will not help as it is parsed by a web browser. I have never heard of websites that perform actions after a download has completed (as it's impossible).

Actually i believe it is possible, and it requires 2 things.

1) You detect a call to premature halt of your script

2) You detect byte count of delivered files.

 

I messed around with something along these lines quite a while ago, but don't recall if i ever got it working.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.