All I want is a single Web Worker shared by all tabs that doesn't get interrupted by page reloads, etc.. Can I simply use a Service Worker as a drop-in replacement to accomplish this? I don't care about caching or networking, only about message-passing (via onmessage
) to offload certain computation to a background process, and perhaps also make notifications.
Sorry if this is a simple question. All I've seen is tutorials for caching and networking, involving installs, etc..