title: Anchor with data URI and download attribute not working in iOS/Safari
body: <p>I've built a simple web app which creates an image from a <code>canvas</code> element using <code>canvas.toDataURL()</code>. I then create an anchor tag using the data URI, containing a <code>download</code> attribute. Something like this:</p>
  
  <pre><code>&lt;a href="data:image/jpeg;base64,somedata" download="filename.jpg"&gt;Download&lt;/a&gt;
  </code></pre>
  
  <p>This works great on Android/MacOS devices on Chrome and Safari - clicking the anchor downloads the data URI as a <code>.jpg</code> file. </p>
  
  <p>But on iOS Chrome clicking the link does nothing. To download the file it requires opening the anchor in a new tab (which displays the image), then saving the image. </p>
  
  <p>I have tried adding a <code>target="_blank"</code> but that does not achieve the desired result. </p>
  
  <p>Is there a way to make iOS work like Android/MacOS, where clicking the link initiates the download? </p>