V
V
Valera Karmanov2020-03-29 17:07:48
PHP
Valera Karmanov, 2020-03-29 17:07:48

How to send a push notification so that the serviceWorker can process it?

Good evening! Who is smarter than the menu, tell me how to send a push notification so that the serviceWorker would process it?
The serviceWorker itself works, I register the subscriber, but I can’t figure out how to send notifications themselves ( can’t I do without Google garbage, why can’t I send notifications from my server? )

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2020-03-29
@motokraft

And how did you write it then, if you don't know how to fix it? In short, when registering a serviceWorker, you make a request to allow pushes, in response you get an endpoint and keys, and data for pushing is sent to this endpoint.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question