Reputation: 829
We would like to implement web push notifications, for some websites we have developed. Most of these websites have been created with Spring MVC. I would like to understand if FCM is the best option for implementing web push notifications or are there other options (without any third party integrations)? We need to be able to send the notifications even when the webapp is not running.
FCM seems to be easier but we would like to know if there are any downsides to it as well?
Upvotes: 3
Views: 3305
Reputation: 35390
It depends on what kind of notifications you want to implement.
For on-site notifications, you can use websockets or SSE. You can build it in house. Then you can optionally display the notifications using the w3c notifications api.
For off-site notifications (like FCM), then you need to use the browser push service. The browser push service is hardcoded in the browser and you can't change it. However note that there are two different kinds of web push services:
Note that I have mentioned FCM in both cases, because it started in the first role and then added also the second role.
Upvotes: 6