33. 如何在 service worker 重启时重用信息
webVueBlog opened this issue · 0 comments
webVueBlog commented
Service Worker 的问题在于它在不使用时被终止,并在下次需要时重新启动,因此您不能依赖 Service Workeronfetch和onmessage处理程序中的全局状态。在这种情况下,服务工作者将有权访问 IndexedDB API,以便在重新启动时保持和重用。
webVueBlog opened this issue · 0 comments
Service Worker 的问题在于它在不使用时被终止,并在下次需要时重新启动,因此您不能依赖 Service Workeronfetch和onmessage处理程序中的全局状态。在这种情况下,服务工作者将有权访问 IndexedDB API,以便在重新启动时保持和重用。