Reputation: 123
I'm developing a website with Node.Js and AngularJs. There is a way to send push notifications to Android, iOS and Web from my app? I reviewed Firebase but i think it's only for mobile devices.
Upvotes: 0
Views: 971
Reputation: 707288
The usual way to "push" notifications from server to client is for the client to make a webSocket or socket.io connection to the server. Since this is a continuous connection (unlike a typical http request which is temporal), then the server can send the client messages over this connection at any time.
This is typically way more efficient than having the client regular "poll" for new information by asking the server "anything new?" every few minutes.
Mobile platforms (Android and iOS) each have their own push scheme that may be preferred if you are just supporting a particular class of mobile device, but their scheme is not applicable to regular browsers.
To help your understanding here, Firebase uses webSockets as its "push" notification channel.
FYI, here's a bit of a summary of various push techniques: Push notification | is websocket mandatory?
Upvotes: 3