OpenPWA Demo

Push permission

Asks for notification permission, then subscribes this browser to push with a VAPID public key generated for this demo. The resulting PushSubscription JSON is printed below and goes nowhere: there is no server, so no message will ever arrive. Unsubscribe when you are done.

Nothing is sent anywhere. The endpoint and keys stay on this page. The private half of the VAPID key pair was discarded after generating the public key, so nobody can use this subscription.

Preconditions

The code being run

Rendered from each function's own source with toString(); the buttons call exactly this.

Request permission and subscribe

Unsubscribe

Run

Reference