Service Worker vs Shared Worker
问题 What is the difference between Service Worker and Shared Worker? When should I use Service Worker instead of Shared Worker and vice versa? 回答1: A service worker has additional functionality beyond what's available in shared workers, and once registered, they persist outside the lifespan of a given web page. Service workers can respond to message events, like shared workers, but they also have access to additional events. Handling fetch events allows service workers to intercept any network