have a web application that receives data from the user in chunks via Ajax (gathered via multiple async operations): each time an operation is complete, a request is sent to the server with the updated data.
I don't know whether the user will quit the page before these operations are complete or not, so I need to process the data they provided, even if it is missing.
Would you point me to an approach that lets me receive and handle only the latest updated data I receive from that particular client, if the server does not receive another packet in a given time (e.g: 30 seconds.)
The proposed approach should:
- Be immediate: data is processed as soon as the timeout is triggered.
- Does not require system access (Runnable in shared web hosting, even with the tightest security)
I have already tried wiring something up with $_SESSION and a custom handler, but couldn't find a suitable way.
Any clues ? Thanks.