I have same blob URL in two tags.
One tag has target="_blank" for opening the link in new tab and the other for downloading.
The "download" is fine but "Open in new tab" just works on Firefox. For Google Chrome, it keeps flashing, opens then closes immediately after clicking the link.
<a id="view" href="" target="_blank">View Blob in new tab</a> <a id="download" href="" download="abc.txt">Download Blob</a> <script> $(function(){ var myBlob = new Blob(['Hello, I am Blob content'], {type: 'text/plain'}) var url = URL.createObjectURL(myBlob); $("a#view").attr("href", url); $("a#download").attr("href", url); }); </script>
Is this a Google Chrome bug? (My Chrome version is: 54.0.2840.99 x64)
Live demo here:
https://jsfiddle.net/fa0kstm5/
To open Blob URL on Chrome iOS with JavaScript, we can use the FileReader constructor. For instance, we write: const reader = new FileReader(); const out = new Blob(['abc'], { type: 'text/plain' }); reader.
Right-click on the webpage and click “Inspect” in the menu. When the DevTools panel opens, click on the three vertical dots in the top-right corner and select “Undock into a separate window.” Press Ctrl + F on Windows or Cmd + F on Mac devices to find the blob URL. Enter “ blob:HTTP ” to find the link for the video.
If your internet is down, Chrome won't work. Make sure your Wi-Fi or cellular connection is switched on. Try opening another webpage or running an application that requires Internet access to function. If the page or the application fails too, that means the problem is with your network connection instead of Chrome.
Right-clicking on a link and selecting "Open Link in New Tab" also opens the link in a new tab on Chrome, even without the Chrome Toolbox extension. In addition, you might be able to click the middle button or wheel on your mouse to open a link in a new tab, depending on your mouse settings.
The cause may be AdBlock. There is a discussion at StackOverflow here: Open blob objectURL in Chrome.
To disable AdBlock, click the AdBlock icon next to your location bar, then "Don't run on this page" or "Don't run on pages in this domain."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With