In my web site (vb.net / c# ) there is javascript ajax code that gets data from the database and returns JSON to my page.
What happens if just before the ajax is about to receive the JSON, the browser is closed or the page was redirected, what happens to that data as there was nothing to receive it?
I can see that because its asynchronous the vb.net carries on running and sends a response. but there was nothing to receive it - what happens to the responses.
It cant just vanish into thin air - technically what happens - will my server crash?
They get sucked into the void, never to be seen or heard of again.
That is, your client pc will still receive the packets via TCP/IP, but the TCP/IP stack will not deliver them anywhere.
Garbage collector dismantles the whole deal.
Once the HttpContext and Session end from the user closing their browser, only requests which have started will continue. They will return data like someone yelling out into the night. The next ones will more than likely be garbage collected because the Session has ended and there is no longer a need to service the thread.
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