How to manually trigger a background sync (for tes

2019-08-12 02:54发布

问题:

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.