csharpnewbie
csharpnewbie

Reputation: 829

Is it possible to implement web push notification without using FCM?

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

Answers (1)

collimarco
collimarco

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:

  • the browser push service (you can't change it): e.g. FCM for Chrome, Mozilla autopush for Firefox, APNs for Safari, etc.
  • an optional web push service that deals with those services for you by creating a new layer of abstraction: e.g. Pushpad, FCM

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

Related Questions