Detecting Browser exit in PHP

后端 未结 4 1580
太阳男子
太阳男子 2020-12-10 09:09

I have looked at a few topics (here & google) regarding detecting browser exit in php and im not really any clearer on how to do so.

I tried the register_s

4条回答
  •  粉色の甜心
    2020-12-10 09:29

    PHP is a server side language. Browser events are handled by DOM events. On "onunload" or "onbeforeunload" events, sending an AJAX call to a PHP file.

    And in this other question there is a flavored explanation of what I'm saying.

提交回复
热议问题