title: Download attribute for <a> does not work for pdfs and images
body: <p>I am trying to force the browser to download when it comes to a PDF or an image rather than opening a new tab. I use Google Chrome. However, when I test out the example under the following link, it works: <a href="https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_a_download" rel="nofollow noreferrer">https://www.w3schools.com/tags/tryit.asp?filename=tryhtml5_a_download</a></p>
  <p>But it does not work on mine (see following). Downloads still trigger for other file types but PDFs and images.
  `const urls = res.data</p>
  <pre><code>  for (const idx in urls) {
      // check if each url is working, if it is working, stop and download it
      const link = document.createElement('a')
      link.href = urls[idx]
      link.target = '_blank'
      link.download = tgt.name
      link.rel = 'noopener noreferrer'
      document.body.appendChild(link)
      link.click()
      document.body.removeChild(link)
    }`
  </code></pre>
  <p>So, what have I done wrong here?</p>