0

I wanna implement push notification for my website: Consider we have a shopping site, whenever a user click on one product, the server should push notification to the owner of the product that user (for example John) wants to buy your shoe. (real-time).

I have read some articles about web worker (like socket.io) and service workers, I conclude that service workers are the best choice. Am I true? How can I implement that push notification?

Mostafa Ghadimi
  • 5,883
  • 8
  • 64
  • 102

1 Answers1

1

A Service Worker is a special kind of Web Workers. For implementing Web Push Notifications, it's a good choice to use Service Workers (does not work for Safari!). There is a great article explaining how to implement it.

JSON Derulo
  • 9,780
  • 7
  • 39
  • 56