title: How to force PDF download in Firefox?
body: <p>I have following code for downloading PDF files from backend:</p>
  <pre><code>    const link = document.createElement('a')
  
      link.href = URL.createObjectURL(blob)
  
      link.setAttribute('target', '_blank')
      link.setAttribute('download', file_name)
  
      link.click()
      link.remove()
      setTimeout(() =&gt; window.URL.revokeObjectURL(url), 100)
  </code></pre>
  <p>It works in Chrome as expected, and I believe it worked in Firefox before, but now Firefox opens file in the same tab instead of downloading, ignoring target and download attributes.</p>