stopping asynchronous XMLHttpRequest

275 Views Asked by At

I have impatient users who update a piece of data on a web page. The update triggers an asynchronous XMLHttpRequest and the response causes the page to update.

My question is this. If the user closes the browser window before the request completes, will the browser send an instruction to the web server to stop the request?

FWIW the users are using Firefox or Safari.

1

There are 1 best solutions below

1
Erik Nedwidek On

The browser should close the connection, which should result in the server getting a close/fin packet. At that point it is up to the server to decide whether it finishes processing or if it stops processing at that point.

I checked to see if I could find what Apache does, but didn't find any documentation on it.