How to detect browser close at server side in asp.net?

前端 未结 4 1902
情深已故
情深已故 2021-01-18 02:25

I wanted to know when the browser is closed at server side in asp.net 2.0. How to detect in code behind?

4条回答
  •  爱一瞬间的悲伤
    2021-01-18 02:29

    Short answer: you can't do that directly since http is stateless. Perhaps you can use some AJAX hearbeat pooling, session timeout detection and other tricks.

    Take a look at this question for more explanation and ideas. This is Java based, but ideas are language agnostic.

提交回复
热议问题