DEV Community

loading...

Discussion on: How to Build a Real-time Chat App With NodeJS, Socket.IO, and MongoDB

Collapse
ezesunday profile image
Eze Sunday Eze Author

You can start with the suggestion:

It's not straight forward though. different browsers implement this differently.

But you can do two things, use the offlineOnline browser api here

Ping a website you are sure will always be available such as Google in a http request. You can broadcast same event to other members saying the user is offline. That's it.