0

I want to call a server method on browser close, is their a way, I have tried

window.onbeforeunload

but this gets call even when I refresh the page, I want to call it only when browser is closed is their a work around.

1 Answers1

1

As far as I know, you can't differentiate between those events. Refreshing, loading another page or closing the browser is exactly the same (all the content is destroyed).

Damp
  • 3,328
  • 20
  • 19