Mostafa Ghadimi
Mostafa Ghadimi

Reputation: 6736

Service Worker vs Web Worker

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?

Upvotes: 0

Views: 2090

Answers (1)

JSON Derulo
JSON Derulo

Reputation: 17522

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.

Upvotes: 1

Related Questions