简体   繁体   English

jQuery保存数据,直到phonegap应用程序关闭?

[英]jquery saving data until phonegap app closes?

Is there a way to write data to a storage that gets erased when phonegap mobile app closes? 是否有办法将数据写入到Phonegap移动应用程序关闭时会被擦除的存储中? I used localStorage (html5) but this data does not get erased when app closes. 我使用了localStorage(html5),但是当应用关闭时,该数据不会被擦除。 How could I save data that last until app closes and I can't save it to variable because I use a lot of .js files and methods and don't want to pass all this variables with parameters. 我该如何保存持续到应用程序关闭且无法保存到变量的数据,因为我使用了很多.js文件和方法,并且不想将所有这些变量都传递给参数。

尝试使用cookie,或者如果数据对于cookie而言太大,则HTML 5 sessionStorage可能会有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM