Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
The whole thing works though sockets. You create events that the client listens to and acts upon.
You can do this yourself or though 3rd party services but they can be pricey. -
dfox425968y@randombug push notifications in general are tricky. I think @nblackburn's idea of a third party service is a good one for many cases because of the ease of implementation.
We use a basic PHP implementation (just search PHP apn for iOS), but you also need something to make it async since generally you don't want to hold up the request while you send the notification. We use SQS for all of our queuing. -
anth128128yI'm not aware of a web exclusive offline push notification technique (but would be happy to learn of one). If offline is avoidable then web sockets are the way to go, not sure about php but im sure there will be libraries to make life easier.
-
anamus7258yPop your PHP code into a Laravel installation and check Laravel Echo for easy event broadcasting. That should do the trick. (Laracasts has a nice video series about this)
-
skonteam9628y@anth12 I think Server Sent Events are better for this particular use case , websocket's two way link might be an overkill.
-
I used to develop this stuff. It's service workers doing it mostly, try googling 'progressive web apps' for more info.
Short answer to your question is yeah you can build something yourself following one of many tutorials available online. But, once your requirements start getting a bit advanced such as segmentation, personalization, and attribution, you might want to start looking at a vendor who does this stuff for a living. -
LuterSD01yWith the development of Internet resources, there is a need to quickly deliver information to users without waiting for them to make a request, right?
Need help
I run a website which runs on PHP(so does devRant) and we want to implement web push notification, now i'm unable to understand how this will work?
1) notification is supposed to be sent from backend? how to know where to send
2) notification is supposed to be sent from javascript? how would i customise it, secondly how to send when user is not on our website
3) is there any tutorials which shows the working example rather than just showing javascript part?
thank you
undefined