Can I use web push notifications to update the page without displaying a notification?

守給你的承諾、 提交于 2019-11-28 05:47:49

问题


I am wondering if I can use web push notifications to update a web page without displaying a notification for the user to interact with. Essentially I want to refresh data after an event on the server.

If this is possible, is it still necessary to receive permission from the user to send these push updates?


回答1:


Yes, you can send push messages without showing a notification, but there are limitations on both Firefox and Chrome on the raw number of "invisible" push messages and the rate at which you send them.

You can experiment a bit with the quotas in different browers using the Push Quota ServiceWorker Cookbook example.



来源:https://stackoverflow.com/questions/45285923/can-i-use-web-push-notifications-to-update-the-page-without-displaying-a-notific

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!