2 years ago

Pusher - How to know when a user is no longer in the website?

Posted 2 years ago by Zalo

Hello all! I'm facing a problem with a real time app that i'm developing. My problem is about user's status using Pusher. I would like to get the correct way to detect when a user leaves the page or keep unactive for a while to set it's status to 'offline', for example. How could I achieve that? I'm almost sure that is not recommended develop this feature at client-side, it would be at server-side, but how? How can I ask to clients if they are still there? Should I create a command and run it wit cron? Any help will be appreciated, Thx!

Please sign in or create an account to participate in this conversation.