(please specify the website or account you are asking about)
My website is social network just like Instagram
I want to create push notification because it is very important for my project. I was using Push.js for this purpose. It worked well on localhost but in here nothing happens
(please share the FULL error message you see)
(other information and details relevant to your question)
Actually I’m doing all the stuff on Android that’s why I cannot open console here, but I created an alert message before that push function and It worked too. The only problem is with the push function.
I don’t know exactly how push notifications work in a browser, or how Push.js does it. But could it be that push notifications require a HTTPS site? Some other features, like service workers and WebRTC, do require HTTPS.
The reason it worked on your localhost is because localhost is usually exempt from this to help developers, but live websites need HTTPS.
Could you please try installing an SSL certificate on your site (you can use our Free SSL Certificates tool to get it), navigate to your website with HTTPS and see if that solves the issue?