You’re probably removing the resource too soon, try delaying it
...
a.click();
setTimeout(function(){
document.body.removeChild(a);
window.URL.revokeObjectURL(url);
}, 100);
}
More Related Contents:
- JavaScript blob filename without link
- Save to Local File from Blob
- Is there any limitation on JavaScript Max Blob size
- How can I tell if a DOM element is visible in the current viewport?
- JavaScript open in a new window, not tab
- Detecting the onload event of a window opened with window.open
- Getting BLOB data from XHR request
- What do {curly braces} around javascript variable name mean [duplicate]
- Link inside a button not working in Firefox
- Firefox ‘Cross-Origin Request Blocked’ despite headers [closed]
- Can I force a link to open in a specific browser?
- Firefox error rendering an SVG image to HTML5 canvas with drawImage
- event.path is undefined running in Firefox
- How JavaScript closures are garbage collected
- Does execCommand SaveAs work in Firefox?
- How can I make event.srcElement work in Firefox and what does it mean?
- What browsers currently support JavaScript’s ‘let’ keyword?
- What happens to code after a javascript redirect (setting window.location.href)?
- JavaScript in or just before ?
- Is it possible to initiate a download prompt in the browser for recognized MIME types using only JavaScript (client-side approach)?
- HTML5 / Javascript – DataURL to Blob & Blob to DataURL
- Get current cursor position in a textbox
- How I can make a browser action button that looks and acts like a toggle
- Adding UTF-8 BOM to string/Blob
- How to disable Javascript when using Selenium?
- Download files like mega.co.nz
- How to detect if user has enabled full screen in browser
- How to force save as dialog box in firefox besides changing headers?
- Synchronous XMLHttpRequest on the main thread is deprecated
- Blob download is not working in IE