Make available as download using JavaScript
1 answer
not. Don't be casual with JavaScript.
What determines that the browser automatically requests to save the file, rather than trying to display it, is its MIME type. And only the server can set the MIME time as it is part of the response header.
Of course, if you are using JS on the server (with Jaxer or another engine) this is another story ...
+1
source to share