According to caniuse the download
attribute of <a>
element is supported at Microsoft Edge build 10547+, but not IE or Safari.
How to download a file object without using <a>
element with download
attribute set or a server?
There are a number of ways of triggering a download. Following are a few:
Use a form:
<form method="get" action="mydoc.doc">
<button type="submit">Download</button>
</form>
Use javascript:
<button type="submit" onclick="window.open('mydoc.doc')">Download</button>