download attribute does not work in <a> tag

Viewed 102

According to the documentation and many posts, the tag

   <a href="..." download="..."></a>

must save a file, however for me it just opens an image in a browser: chrome, firefox, safari.

download. Prompts the user to save the linked URL instead of navigating to it.

What should I do to force downloading to a drive, without JS?

Minimum working example:

<!DOCTYPE html>
    <html lang="en">
    <head>
    </head>
    <body>
        <a href="https://media.istockphoto.com/photos/autumn-morning-at-the-cathedral-picture-id621235832?s=612x612" download="test.jpg">download </a>
    </body>
    </html>

1 Answers

This link might be helpful . From Chrome 65+ download tag is discontinued. It is accepted only when it is from the same origin.
Problem here is, It uses JS. So, It is not completely independent of JS.

Related