How can I do push notifications in an HTML5 Web application?
问题 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? 回答1: 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