I'm using the download attribute on an anchor (link).
In some rare cases, I know that I'll have a 404 error (file not found).
Chromium based browsers handle it by showing a Download failed - No file in the download pane. This seems right to me.
Firefox on the other hand, does not show any error message and only opens a blank 'New tab'.
Is this a normal Firefox behavior? I this a Firefox bug ? Am I doing it wrong ?
In the case of a non-200 HTTP code, I would like the user to be informed
If possible, I would like to avoid the use of JS
The download URL (href) is on the same domain to comply with the
same-originpolicy.Here is an CodePen example (don't run on stackoverflow snipet for same-origin policy) : https://codepen.io/random-bytes/pen/xxBLdYr