You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The revokeObjectURL() static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL().
Call this method when you've finished using an object URL to let the browser know not to keep the reference to the file any longer.
So the 40-second delay is just to relase the resource, prevent any memory leak.
The revokeObjectURL() static method of the URL interface releases an existing object URL which was previously created by calling URL.createObjectURL().
Call this method when you've finished using an object URL to let the browser know not to keep the reference to the file any longer.
So the 40-second delay is just to relase the resource, prevent any memory leak.
Why 40 seconds rather than 30 seconds or 60 seconds?
Maybe 40 seconds or 30 seconds or 60 seconds are all okay, seems to don't matter.
I guess it's just used to wait and ensure the file is downloaded completely.
I asked same question on Stack Overflow, see here.
The source code FileSaver.js#L106
Why is there a 40-second delay in calling the
URL.revokeObjectURL
method? Why don't call it immediately after callingURL.createObjectURL(blob)
?The text was updated successfully, but these errors were encountered: