I have an app where I make an asynch AJAX call for each page that is loaded, so I can track the flow of a user through the app. Normally the call back to the server to record the visit happens very quickly. However, it appears that on occasion I'm missing some page visits, and I'm wondering if it's because they leave the page before the request is completed.
I know that an asynch AJAX is non-blocking. However, what I don't know is what happens to the AJAX request if the user leaves the page before the request is completed. Can someone help me with this?
If it matters, the service is a C# service.
When a client leaves the page, AJAX calls will be aborted. The server will not be able to send a response to the client.
If there is time to browser abort ajax request, request never arrives to server.
But once request arrived whether browser closed or not, it is processed by server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With