1

When a web application running and on close the browser window then which event raise?

Nakul Chaudhary
  • 25,572
  • 15
  • 44
  • 47

4 Answers4

1

onunload is the event raised when closing the browser window.

How ever this event isn't fired only when closing the browser, that's just one case.

Brian Gianforcaro
  • 26,564
  • 11
  • 58
  • 77
0

The web browser doesn't send any notification to the web server when the user closer the window.

Tim
  • 813
  • 5
  • 14
0

You may also be interested in onbeforeunload.

Armandas
  • 2,276
  • 1
  • 22
  • 27
0

See my answer at the thread pointed by Diodeus: basically, you cannot... Lot of browsers just no longer fire onbeforeunload and/or onunload. And even when they do, it is hard to distinguish between page reload, page jump and browser/window/tab closing.

PhiLho
  • 40,535
  • 6
  • 96
  • 134