One of the major problems with WebSQL is its vulnerability to losing data. Every time the browser history is deleted so is the data stored in your WebSQL tables. Is there any way to export/download the WebSQL data or write it to a file, using only Javascript to prevent data loss? I know you can’t access the file system from JavaScript so is this even possible to do? Thanks.
Share
You could get all the data into a JavaScript variable and then
document.locationto it.HTML:
JavaScript:
(Taken from this blog post: How to Download Data as a File from JavaScript)