0

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.

andr
  • 15,970
  • 10
  • 45
  • 59

1 Answers1

0

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.

Erik Nedwidek
  • 6,134
  • 1
  • 25
  • 25
  • If Apache stops the async process then the only other option would be to stop the window from closing while there is an outstanding request - or at least prompt the user. Next challenge... – Rick Marshall Jan 17 '13 at 02:01