top | item 39752305 (no title) jedschmidt | 1 year ago A service worker would work fine; the connection would be instantiated from the SW and each window/worker could communicate with it via navigator.serviceWorker. discuss order hn newest esprehn|1 year ago That doesn't work because browsers have duration limits on ServiceWorkers:https://github.com/w3c/ServiceWorker/issues/980#issuecomment...Also unfortunately Chrome doesn't keep SharedWorker alive after a navigation (Firefox and Safari do):https://issues.chromium.org/issues/40284712Hopefully Chrome will fix this eventually, it really makes it hard to build performant MPAs. jedschmidt|1 year ago In my experience, as long as a controlled window is communicating with the SW, the connection will remain alive.
esprehn|1 year ago That doesn't work because browsers have duration limits on ServiceWorkers:https://github.com/w3c/ServiceWorker/issues/980#issuecomment...Also unfortunately Chrome doesn't keep SharedWorker alive after a navigation (Firefox and Safari do):https://issues.chromium.org/issues/40284712Hopefully Chrome will fix this eventually, it really makes it hard to build performant MPAs. jedschmidt|1 year ago In my experience, as long as a controlled window is communicating with the SW, the connection will remain alive.
jedschmidt|1 year ago In my experience, as long as a controlled window is communicating with the SW, the connection will remain alive.
esprehn|1 year ago
https://github.com/w3c/ServiceWorker/issues/980#issuecomment...
Also unfortunately Chrome doesn't keep SharedWorker alive after a navigation (Firefox and Safari do):
https://issues.chromium.org/issues/40284712
Hopefully Chrome will fix this eventually, it really makes it hard to build performant MPAs.
jedschmidt|1 year ago