3 ms·
A server component isn’t a surprise to me, as something needs to be sending the “push” to the client. It’s either your servers, or Apple and googles servers. W
by wutwutwat 3y ago
A server component isn’t a surprise to me, as something needs to be sending the “push” to the client. It’s either your servers, or Apple and googles servers.
What I don’t fully understand about webpush, and the people trying to use it who are having issues, why not just use regular websockets/what is the difference between webpush and websockets. Both require a server, both require a persistent connection, both allow the server to “push” data to any client connected.
In my mind the “push” mechanism should be a system that isn’t constantly connected to a server, yet a server would still be able to route packets to a client where it wanted. Do our phones really have nonstop persistent connections to apns to get pushes? How could that run all the time and not kill batteries? Maybe I don’t know what webpush is even thought I’ve read about it lol
- modeless 3y agoWebsockets only work while your site is open in a tab and the tab is not frozen. Web Push works even when all browser windows are closed.
- danShumway 3y ago> Web Push works even when all browser windows are closed. Well... "works" ;) But that is the idea, and that is why a lot of developers were excited about web push. It says something about the state of web notifications that we all got excited about being given the opportunity to set up a remote server, track notification subscriptions, and manually trigger them via an HTTPS request. And yet, we did get excited about that; that was seen as an improvement. And I guess the joke is on us for thinking that if we did all that the phone would finally actually show the user the notification reliably :)