GoogleChromeLabs / web-push-codelab

Other
556 stars 291 forks source link

How does it work? #105

Open RevealedFrom opened 2 years ago

RevealedFrom commented 2 years ago

Thank you! I duplicated the demo code, and it works, somewhat mysteriously.

When swRegistration.pushManager.subscribe() is called, a subscription is received successfully, but from whom? What/who does the subscribe function call or contact to provide the push service? I don't see this specified in the function invocation parameters? This is not mentioned or explained.

About the site web-push-codelab.glitch.me, who is offering this service? Is it for demonstration purposes in this codelab only or is it something we can use for business use?

How do I use web-push-codelab.glitch.me to test a push message? The Subscription field asks for a p256dh key and auth secret. What are these?

Lastly, is the push service a 1-to-1 thing or is it a mass broadcast to all Service Workers out there with the same subscription?