Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File download complete callback

Tags:

javascript

I would like to able to track, purely on the client side, the progress of a file download, especially file download completion.

Is there a JavaScript API that allows me to define a callback upon file download completion?

like image 637
Randomblue Avatar asked Aug 18 '12 16:08

Randomblue


1 Answers

No, this is not possible using pure javascript. There are some techniques though involving using cookies from the server and continuous poll from the client. I've illustrated an example here:

Hide image using Javascript after controller action is complete MVC3

like image 170
Darin Dimitrov Avatar answered Sep 21 '22 07:09

Darin Dimitrov