K
K
Kolya Vantukh2016-08-17 20:33:59
PHP
Kolya Vantukh, 2016-08-17 20:33:59

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

4 answer(s)
D
Dima Pautov, 2016-08-17
@vkolya

https://nickersoft.github.io/push.js/

O
Oleg Karnaukhov, 2016-08-17
@BupycNet

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.

Y
Yuri Grinev, 2016-08-17
@linakun

We use the wonderful OneSignal. Web pushes to the browser / iOS / Android even when the site is closed.

N
nirvimel, 2016-08-18
@nirvimel

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:

  1. Server push .
  2. Long Polling (almost the same in essence).
  3. comet .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question