问题
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