Closed TexKiller closed 5 years ago
Have you tested it? dose it work?
Yes, I have, and yes, it does. :)
I have set up an example that writes 3600 'a' letters into a stream in the course of an hour. The download fails after about 30 seconds when I use the current github.io version of StreamSaver.js: https://texkiller.eu.org/StreamSaver/firefox-timeout/github.html
However, with this commit applied that does not happen and the download is completed after 1 hour: https://texkiller.eu.org/StreamSaver/firefox-timeout/
By the way, this obviously doesn't work on HTTP pages since the popup is closed immediately after the download starts, and therefore it doesn't ping the ServiceWorker. You can test this here, but make sure you don't have the previous link open since it's iframe will keep the ServiceWorker alive regardless: http://texkiller.eu.org/StreamSaver/firefox-timeout/http.html
This was all tested on Firefox 65.0.
Grate test page! ❤️ tested it myself and you stand correct
Ping the ServiceWorker every 29 seconds to prevent Firefox's 30 seconds timeout