Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome web notifications without SSL (bypassing Service Worker)

So, is it possible to implement web notifications for Chrome without SSL certificate? I want to avoid installing SSL on my site and it would be cool if there was a way to send notifications without Service Worker.

like image 475
Vladimir J Avatar asked Sep 01 '15 08:09

Vladimir J


1 Answers

You can still use the (old) Notification(title, options) constructor and it’ll work on some (desktop) platforms. But (as I guess you know), it doesn’t work in Chrome for Mobile (Android).

What does work on Chrome for Mobile is the ServiceWorker-based showNotification(title, options) approach. But per the Service Workers spec, you can only use Service Workers in secure contexts (in order to protect users from the risks associated with insecure contexts).

So if you want something that will work for Chrome for Mobile users, then the answer is, No, it’s not possible to use Web Notifications in Chrome for Mobile without Service Workers (and so also, without deploying an SSL certificate for your site).

like image 132
3 revs Avatar answered Nov 14 '22 04:11

3 revs