Before being able to send messages via this push service, the client (web browser) has to subscribe to a service on an application server. We use in this demo OpenACS.org as an application server for testing purposes.
This service depends on The Google/Mozilla Web Push services amd was tested with recent versions of Firefox and Chrome on Windows, Linux, macOS and Android (currently just Chrome). It does not work with Safari or on any browser in iOS due to limited support on these Browsers.
The application server is identified over its public key, which is for this demo hard-coded in webpush.js included by this demo. If you have not subscribed to the demo service yet, please subscribe:

Once you've subscribed your user, your subscription is typically sent to the server and saved there in a database such that the server can send you a message via this subscription. The subscription is not saved for this demo.
The application server can now send an encrypted message to the Push Service, which will deliver the push message to the client. The TTL option specifies, how long the Push Server will try to deliver it.

For the technical details behind this demo, see Implementing Web Push with NaviServer.