Answer the question
In order to leave comments, you need to log in
Push notification about new news?
I'm making a news site. When news is added, all users are notified of the new news. I implemented the server part using Rachet and ZMQ, I don't quite understand how to do it with the client part. So far I have made notifications only through the console, everything works. But not through the console to notify users. The question is, how to make alerts something like VK? what tools to use in order to be supported by most browsers? thanks for answers
Answer the question
In order to leave comments, you need to log in
Keep in mind that a purely JS solution will only give you a notification when a tab is open.
You can use GCM for web push notifications in chrome, or use PushAll to send notifications to all devices even when the browser is closed.
We use the wonderful OneSignal. Web pushes to the browser / iOS / Android even when the site is closed.
WebSocket was designed to solve just this problem. That is, historically, this is its main purpose. And all sorts of chats on it (which are now like HellowWorld in every example), this is already a consequence of its capabilities.
And before the advent of WebSocket, different crutches were used for this purpose:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question