title: Alternative for 'download' attribute in Safari/iOS
body: <p>I have a blob created with a base64, and I need to make this data downloadable as a pdf.</p>
  <p>I created this snippet:</p>
  <pre><code>    var blob = new Blob([byte]);
      var link = document.createElement('a');
  
      link.href = window.URL.createObjectURL(blob);
      link.target = '_blank';
      var fileName = name + '.pdf';
      link.download = fileName;
      link.click();
  </code></pre>
  <p>It works on all the browsers, except safari mobile on iOS.</p>
  <p>The file gets actually downloaded, but its name is &quot;unknown&quot;, then it can't be open since the extension gets lost.</p>
  <p>The problem is that the <a href="https://caniuse.com/#search=download" rel="nofollow noreferrer">download attribute</a> lacks support on this browser and IE.</p>
  <p>There are a lot of workarounds for IE, but I didn't find any for Safari/iOS.</p>
  <p>Do you know how can I download a blob got from a base64 (no XHR involved) in this browser?</p>
  <p>Thank you</p>