I have been reading for past few hours about Push Notification API and Web Notification API. I also discovered that Google & Apple gives push notification service for free via GCM and APNS respectively.
I am trying to understand if we can implement push notification to browsers using Desktop Notification, which I believe is what Web Notification API does. I saw a google documentation on how this can be done for Chrome here & here.
Now what am still not able to understand is:
I believe all these answered in one answer can help a lot of people who are having similar confusions.
Pushed allows you to send real-time notifications without developing your own app to iOs, Android and Desktop devices.
Step 1: Push service providers, say WebEngage, marketing automation, essentially provides you an application server. This server sends the push message payload to the user's device via FCM. Step 2: FCM is the notification service by Google which lets you deliver messages to the user's device (both desktop and mobile).
So here I am answering my own question. I have got answers to all my queries from people who have build push notification services in the past.
Update (May 2018): Here is a comprehensive and a very well written doc on web push notification from Google.
Answer to the original questions asked 3 years ago:
- Can we use GCM/APNS to send push notification to all Web Browsers including Firefox & Safari?
Answer: Google has deprecated GCM as of April 2018. You can now use Firebase Cloud Messaging (FCM). This supports all platforms including web browsers.
- If not via GCM can we have our own back-end to do the same?
Answer: Yes, push notification can be sent from our own back-end. Support for the same has come to all major browsers.
Check this codelab from Google to better understand the implementation.
Some Tutorials:
Implementing own backend in various programming languages.:
Further Readings: - - Documentation from Firefox website can be read here. - A very good overview of Web Push by Google can be found here. - An FAQ answering most common confusions and questions.
Are there any free services to do the same? There are some companies that provide a similar solution in free, freemium and paid models. Am listing few below:
Note: When choosing a free service remember to read the TOS. Free services often work by collecting user data for various purposes including analytics.
Apart from that, you need to have HTTPS to send push notifications. However, you can get https freely via letsencrypt.org
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With