I have a web application. I want to use the HTML 5 inbuilt notifications API to do push notifications from the server when the user is on a particular page. Is it possible?
相关问题
- Plugin with id 'com.google.gms.google-services
- google-drive can't get push notifications
- Custom click on Ionic notification using Firebase
- When you are on flight mode and exit from the Flig
- Android GCM - Send different payload to each user
相关文章
- HTML5 control
- How can I add media attachments to my push notific
- How to open current activity which is open while c
- Does the apple push notification distribution cert
- How posting One Signal notification's addition
- App not showing Notification receiving FCM when th
- iOS Push Notifications with empty aps dictionary
- Make Web push notification work using webview in a
You can do real push notifications with Web apps today in Chrome using Service Workers and PushManager from the W3C Push API.
See the article Push Notifications on the Open Web for a step-by-step how-to and code snippets you can use. Here’s a diagram from that article that explains what the UI around it looks like.
An implementation of the Push API has already landed in Firefox too; it’s targeted for shipping in November 2015 in Firefox 42. And Microsoft has indicated that the Push API is also under consideration for implementation in Edge team as well.
Below is a simple code example, borrowed from MDN.
It depends on what you want to achieve: