This question already has an answer here:
- check if download is completed 5 answers
I am creating zip files dynamically which user should download and after download is complete I want to remove the file .I think all JS ways are not safe . So not a secret that php it is a server side language and this makes me think that in some way there must be away that between that client and my server bytes are no longer transmitted so I can tell that now the download is complete . IS there a similar way of accomplishing what I described above ?
as far as i know there is no way to know when a user has finished the download.
I would store the files in a separate queue and delete them after a certain time has passed (something between 1h and 1d)