简体   繁体   English

html5本地存储

[英]html5 local storage

so I'm trying to figure out where the client side db gets stored actually. 所以我想弄清楚客户端数据库实际存储在哪里。 If I create something like this 如果我创建这样的东西

var mcTasks = {};
    mcTasks.webdb = {};

    //OPENING THE DATABASE
    mcTasks.webdb.db = null;
    mcTasks.webdb.open = function() {
    var dbSize = 5 * 1024 * 1024; // 5MB
    mcTasks.webdb.db = openDatabase('todo', '1.0', 'todo manager', dbSize);
    }

Where does this get stored? 这存储在哪里? in cache? 在缓存中? and if so that means that if I clear the cache the info gets lost right? 如果是的话,这意味着如果我清除缓存,信息会丢失吗?

I'm trying to figure out which solution is better sqlLite or window.localStorage, any help is appreciated. 我试图找出哪种解决方案更好的sqlLite或window.localStorage,任何帮助表示赞赏。 thanks! 谢谢!

It gets stored in a location on the client machine, as a persistent file. 它作为持久文件存储在客户端计算机上的某个位置。

This is separate from the cache, so clearing the cache shouldn't have an effect on the stored data. 这与缓存是分开的,因此清除缓存不会对存储的数据产生影响。

Where exactly the file is stored depends on the implementation. 文件的确切存储位置取决于实现。

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

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