diff --git a/src/index.html b/src/index.html index 1bf19d4..1044451 100644 --- a/src/index.html +++ b/src/index.html @@ -150,7 +150,7 @@
To start, you’ll first need to make sure your web server is setup to send pushes. We’ll be using a node.js server and take advantage of the open-source web-push library so that we don’t have to worry about the encryption details involved with sending a push.
We’ll first need to call npm install express
(web server) and npm install web-push
(web push library) from a terminal or command prompt so that we can use them in our app.
We’ll need to specify the VAPID keys that will allow identifications between our app’s server and the notification server (e.g. Firebase Cloud Messaging (FCM), Mozilla Cloud Services (MCS), and Windows Push Notification Service (WNS) depending on which browser is being used). You only need to set up the VAPID keys once which can be generated easily:
+We’ll need to specify the VAPID keys that will allow identifications between our app’s server and the notification server (e.g. Firebase Cloud Messaging (FCM), Mozilla Cloud Services (MCS), and Windows Push Notification Service (WNS) depending on which browser is being used). You only need to set up the VAPID keys once which can be generated easily:
var webpush = require('web-push');
console.log(webpush.generateVAPIDKeys());
Once they’re generated, you can use them for as long as you need to by setting the vapidKeys variable to what you just got when calling generateVAPIDKeys()
:
The W3C Push API and Notification API go hand-in-hand to enable push notifications in modern browsers. The Push API is used to set up a push subscription and is invoked when a message is pushed to the corresponding service worker. The service worker then is responsible for showing a notification to the user using the Notification API and reacting to user interaction with the notification.
-A standardized method of message delivery is also important for the W3C Push API to work consistently across all major browsers where application servers will need to use multiple push services. For instance, Google Chrome and Mozilla Firefox use Firebase Cloud Messaging (FCM) and Mozilla Cloud Services (MCS), respectively while Microsoft Edge relies on the Windows Push Notification Service (WNS) to deliver push messages. To reach reasonable interoperability with other browsers’ messaging services, WNS has now deployed support for the Web Push protocols being finalized within IETF, as well as the Message Encryption spec and the Voluntary Application Server Identification (VAPID) spec for web push. Web developers can now use the Web Push APIs and service workers to provide an interoperable push service on the web.
+A standardized method of message delivery is also important for the W3C Push API to work consistently across all major browsers where application servers will need to use multiple push services. For instance, Google Chrome and Mozilla Firefox use Firebase Cloud Messaging (FCM) and Mozilla Cloud Services (MCS), respectively while Microsoft Edge relies on the Windows Push Notification Service (WNS) to deliver push messages. To reach reasonable interoperability with other browsers’ messaging services, WNS has now deployed support for the Web Push protocols being finalized within IETF, as well as the Message Encryption spec and the Voluntary Application Server Identification (VAPID) spec for web push. Web developers can now use the Web Push APIs and service workers to provide an interoperable push service on the web.