I create a file in JavaScript. Now I want to be able to make it available to the user as a download is this possible?
To be exact it is a KML File I create so its basic XML.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
No related questions found
no. Not sipmly with JavaScript.
What determines the browser to automatically prompt you for saving a file, instead of trying to display it, is its MIME type. And only the server can set the MIME time as it is part of the header of the response.
Of course, if you use JS on the server (with Jaxer or another engine), it’s another story…