In Chrome, is there any way to manually trigger a background sync for testing/development purposes?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can now use a force sync in developer tools in Chrome on your service worker.
Go Dev Tools --> Application --> Service Worker and you will see Sync button and next to it a space to write commands.
回答2:
There's no way to do this in Chrome right now (April 2016). Follow this bug for updates.