I am trying to summarize the general workflow of providing users with push notifications through a service worker.
I have been following this with Googleβs Employer for Push Notification Service Developers, and currently Iβm thinking about how I can implement these things with a small user experiment web application.
In my opinion, the overall workflow of a web application that supports push notifications is as follows:
- Customer visits application
- Service worker receives push notification endpoint
- The client sends the endpoint to the server
- The server associates the endpoint with the current user stating that the endpoint was generated for
- Each time your application says that the notification deserves attention, the server captures the endpoint (s) of the push notification associated with the user and calls on it to send a push notification to any user devices (possibly with a data payload in Chrome 50+, etc.)
Basically, I just want to confirm that my general thoughts on implementing using this technology are accurate, otherwise get feedback if I missed something.
source share