Please take a look here https://firebase.google.com/docs/cloud-messaging/js/client and my github FREE source code push web notification demo https://github.com/zidane168/WebPushDemo