-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How long can the service worker stay awake during an active fetch #1182
Comments
Firefox also stops after a particular timeout (~5 minutes) regardless of extension promises even if no new functional events have been received. I agree, though, long term streaming needs some kind of solution that does not result in abuse. I guess if closing the window that initiated the FetchEvent aborts the stream then maybe it would all just work. |
In addition to @wanderview proposal, I would add some mechanism for the service worker provide a ceiling time estimation so the browser could notify the user properly. Perhaps not showing the estimation but telling the user: "There are in-progress downloads, do you want to keep them in the background?" and re-prompt after that time expires: "The downloads are taking too much time, do you want to abort them?" |
Can you extend this 5-minute limit time? It's already 2023, and I hope to extend this fixed time |
This issue was WONTFIX'd https://bugs.chromium.org/p/chromium/issues/detail?id=753646 because "Chrome stops the service worker after 5+ minutes timeout even if it is streaming."
This means it's impossible to use service worker to serve a stream of a 2hr movie.
I feels like we should enable this somehow. Eg
fetchEvent.waitUntil
should be able to keep the service worker alive for as long as the fetch is in-progress.The text was updated successfully, but these errors were encountered: