I want to remove a temp file from the server after the user close the page (I assumed I don’t have this callback on the server by default),
I tried to call a server side method using (ICallbackEventHandler implementation) when the user close the page, but the problem is that the server side method doesn’t fire in this case (closing the page), it only response if the page still opened. and I don’t prefer to stop closing the page until the server response and send its call back to close the page manually.
In case I must stop closing the page, kindly help me with the best way.
Thanks in advance
I think it might just be more prudent to delete the file after some time period, say 24 hours, on a recently-accessed basis. That is, all files who haven’t been touched in 24 hours get deleted.
Alternatively, you could poll with AJAX, and as soon as you don’t receive a request with the user’s identifying token within some time threshhold > the polling interval, delete the relevant file.