javascript - Chrome.Storage.Local Persistence -


All I have started developing small extensions using Chrome's various APIs, and although things are doing a great job I am still curious about some things.

Two questions, if all of you will not mind helping me:

1 Can anyone tell me how limitations are to Chrome? Storage. Strongness of the locals? I have tried various tests on my own, like storing some things with chrome.storage.local.set (), clearing all my browser history, cookies etc. and then everything is still there. Often it will still happen, but sometimes I'll check it later and it will run. Overall, I'm definitely unable to label what I'm doing, which is sometimes clearing away the .local data.

2. I'm mostly working with Chrome. Storage chrome is not all the time being synchronized by using the "Sign in Chrome" feature. In the case that I have read on the API page. SCNC is used, whereas Chrome is offline (even not logged in, I believe, which is my case), the data is stored locally and then synced later My main concern is That's what i chrome The data I'm using Storage.Com is likely to be erased, as I am using Chrome. Storage. In the local past? One of the main reasons I I am using Syync, anyway because I have never experienced its data, while I have it. Local (like I have described in # 1.)

Thank you very much! Please help me!

Edit: I am absolutely sure that I am not getting empty space by accidentally removing the extension and then adding it back. Know that will clean up .local data (but preserves .sync).

I am the author of that API.

chrome.storage.local should not disappear except for uninstallation (which looks like your case) or, database corruption (and we have seen this specifically on system restore).

chrome.storage.sync works the same way, except that the merge algorithm that it uses may cause data loss if 2 machines have conflicting changes. In your case, this can happen when you enter the machine that is using chrome.storage.sync. More generally it will be because a machine is offline, or during change, or perhaps the user is able to simultaneously change the data on 2 machines (this is why the user is recommended to change the data on the action - we Should be documented on it).

What is the cost for it - and we should also document - merge algorithm is the last-change-win and synchronization-the truth of the source-but any local key / value pairs won 'deleted Can not go if you have: computer A (sign in and sync) on computer B (not signed), {a: 1, b: 2}, at {b: 3, c: 4}

And after completing a complete sync in Computer B, place the storage on both A and B Will end at {a: 1, b: 2, c: 4}, because the data of A was already a part of the sync, it is the source of truth, but 'C' was still not in existence, so added Was there.

In this scenario, 'A' will be added by adding an 'on-change event' to A and B will get an on-change event, add 'A' and 'B' to 3 to 2 Update

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -