Reputation: 165
I have implemented web push using Firebase using Service-workers (which works only for https website). I want to use web push notification for http website. I have read that it is possible to implement the web push for http website using some tweaks like subscribing to any third party. Two questions I want to ask: a) Is it possible to achieve the same without using any third party library? b) How can I achieve the same behaviour for my website?
Any help is appreciated.
Upvotes: 0
Views: 831
Reputation: 1891
a) Is it possible to achieve the same without using any third party library?
From the developer guide: No, During development you'll be able to use service worker through localhost. but to deploy it you need HTTPS, the site registering the service worker must on on HTTPS and the service worker, which has to be on the same origin, will be served over HTTPS as a result. For security reasons. Having modified network requests, wide open to man in the middle attacks would be really bad
b) if you need web push notifications and you don't have an SSL take a look at Pushpad Express https://pushpad.xyz/
Upvotes: 2