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.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
You could get all the data into a JavaScript variable and then
document.location
to it.HTML:
JavaScript:
(Taken from this blog post: How to Download Data as a File from JavaScript)