First, thanks so much for this great article and code example - they are very helpful to me!
However, my understanding of Service Workers (especially on mobile devices) is that they shut down very frequently and there's essentially nothing that can be done to control this.
So, what happens to the SSE connection when the Service Worker shuts down? It wouldn't be able to receive any new events/messages. Do you use any sort of timer loop to trigger a re-connection? Or are you just content to let that happen on its own, be it from other events or new tabs triggering the SW?
Thanks!
First, thanks so much for this great article and code example - they are very helpful to me!
However, my understanding of Service Workers (especially on mobile devices) is that they shut down very frequently and there's essentially nothing that can be done to control this.
So, what happens to the SSE connection when the Service Worker shuts down? It wouldn't be able to receive any new events/messages. Do you use any sort of timer loop to trigger a re-connection? Or are you just content to let that happen on its own, be it from other events or new tabs triggering the SW?
Thanks!