Freelance Web Developer

Nov 16, 2012

Generate and download a file in pure javascript

Here is a question.

Is generating files possible with JavaScript alone?

I am sharing an idea, let me know how we can improve it or how useful this is. 
We are going to use the dataURI and A[DOWNLOAD] in this example.

window.location.href="data:text/plain,text goes here";

Check this simple prototype here -

Labels: , , ,

By :