I have plan to integrate Push Notifications for Chrome (Push API and Notification API).
After successful subscription Chrome server send to client some special token ("endpoint") which you can use to identify the client and to send any push messages.
From the doc:
The endpoint should be saved on your server for each user, since you’ll need them to send push messages at a later date.
I have few questions:
- How you manage "endpoint" on your server side? Would you send this "endpoint" after successful subscription to your server by AJAX and save into DB. Or you save it to the cookies and after that save it on the server after login/registration request.
- I wonder, how you connect "endpoint" with real user? User can open your site, click "Allow" to show push notification, but he doesn't have the session cookie, so you can't identify this "endpoint" with real user on that time.
- Does this "endpoint" have some TTL?