Chrome推送通知:此网站已在后台进行更新 [英] Chrome Push Notification: This site has been updated in the background

查看:9018
本文介绍了Chrome推送通知:此网站已在后台进行更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在实施Chrome推送通知时,我们从服务器获取最新更改。在这样做的过程中,服务人员正在显示一条额外的通知,其中包含消息


该网站已在后台更新


已经尝试过这里发布的建议
https://disqus.com/home/discussion/html5rocks/push_notifications_on_the_open_web/

但到目前为止找不到有用的东西。有什么建议吗?

解决方案

通常,只要您收到来自GCM(Google Cloud Messaging)的推送消息,就必须显示浏览器中的推送通知。这是在这里的第三点提到:



https://developers.google.com/web/updates/2015/03/push -notificatons-on-the-open-web#什么是推送消息的限制-chrome-42

可能会发生这种情况,即使您收到来自GCM的推送消息,您也会跳过推送通知,但您会收到推送通知,并显示一些默认消息,如此网站已在后台更新。


While implementing the chrome push notification, we were fetching the latest change from our server. While doing so, the service-worker is showing an extra notification with the message

This site has been updated in the background

Already tried with the suggestion posted here https://disqus.com/home/discussion/html5rocks/push_notifications_on_the_open_web/
But could not find anything useful till now. Is there any suggestion ?

解决方案

Generally as soon as you receive a push message from GCM (Google Cloud Messaging) you have to show a push notification in the browser. This is mentioned on the 3rd point in here:

https://developers.google.com/web/updates/2015/03/push-notificatons-on-the-open-web#what-are-the-limitations-of-push-messaging-in-chrome-42

So it might happen that somehow you are skipping the push notification though you got a push message from GCM and you are getting a push notification with some default message like "This site has been updated in the background".

这篇关于Chrome推送通知:此网站已在后台进行更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆