最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Chrome web notifications without SSL (bypassing Service Worker) - Stack Overflow

programmeradmin6浏览0评论

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.

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.

Share Improve this question asked Sep 1, 2015 at 8:01 Vladimir JVladimir J 811 silver badge6 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

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).

发布评论

评论列表(0)

  1. 暂无评论