I wrote a code like this:
<a href="input.txt" download="output.txt"><button>Download</button></a>
But, it only works in Chrome and Firefox. IE doesn't support it.
How to do this in a way that all browsers support it?
I wrote a code like this:
<a href="input.txt" download="output.txt"><button>Download</button></a>
But, it only works in Chrome and Firefox. IE doesn't support it.
How to do this in a way that all browsers support it?
<form method="get" action="input.pdf">
<button type="submit">Download</button>
</form>
You could use a button like this for the download. This wont work in files like txt and images. for forcing download for these files, changes need to made in the server side.