How to know when user closes browser? Chat application

前端 未结 6 1880
离开以前
离开以前 2020-12-20 02:15

I have a simple chat client set up that allows users to login with a username and stores the messages they write in an sql database. Every 3 seconds, the database simply pri

6条回答
  •  粉色の甜心
    2020-12-20 03:11

    You could possibly attach to the onunload event in javascript. Have a look at http://help.dottoro.com/ljflhicd.php for full details.

提交回复
热议问题