1

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

Nakul Chaudhary
  • 24,636
  • 15
  • 43
  • 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
  • 25,613
  • 11
  • 55
  • 77
0

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

Tim
  • 820
  • 5
  • 14
0

You may also be interested in onbeforeunload.

Armandas
  • 1,690
  • 1
  • 17
  • 24
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
  • 39,674
  • 6
  • 93
  • 131