How to download a file in javascript?

How can I generate a file for download locally with JavaScript?

  • I want my app to generate a file (ie. text file) appearing in the download section of Chrome (in a web app in my case). I would like that no website would be involved for that. Is that possible?

  • Answer:

    Downloadify (https://github.com/dcneiner/Downloadify) appears as the best solution. But Flash is used here.

David Combe at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.