Saving a data string as a file with HTML5 + Javascript without using a URI

Possible duplicate:
Cross Browser Save as .txt

I am looking for a way to save writing data to a file only using HTML5 and Javascript without using any server-side methods (PHP, ASP, etc.)

I am using a URI at the moment:

<script> var content = "test"; uriContent = "data:plain/text.," + encodeURIComponent(content); newWindow=window.open(uriContent, 'test'); </script> 

However, browsers do not name the file with the correct extension. I am wondering if there is a way to save strings without using only HTLM5 + Javascript

0
source share
1 answer

Unfortunately, we are not yet. There is a project for the FileWriter API , but it is not implemented in most browsers.

If you can return to Flash, you should take a look at Downloadify .

+2
source

All Articles