StorageEstimate.usage doesn't seem to include localStorage
Categories
(Core :: Storage: StorageManager, defect, P3)
Tracking
()
People
(Reporter: sheppy, Unassigned)
References
Details
Attachments
(1 file)
60.07 KB,
application/pdf
|
Details |
I've been working on docs for the navigator.storage.estimate() and the related content, and while trying to make a simple example, I used code like this on a page with a decent amount of content: for (var i=0; i<1000; i++) { localStorage.setKey("key" + i.toString(), document.documentElement.innerHTML); } The goal was to add some stuff to localStorage and then fetch the usage to show that it'd changed. But it doesn't. It stays 0 the entire time. According to the Storage Standard spec, localStorage should apply to this figure, and the code seems to reference localStorage, so I'm confused why this doesn't work. Maybe I've got something wrong but I've done a similar test using indexedDB and that works fine.
Comment 1•8 years ago
|
||
Eric, thanks for the documentation and thanks for reporting this issue. :) No, you didn't misunderstand anything; this is a known issue that we plan to integrate localstorage to quotamanager/storage later. Shawn, please feel free to chime in if you have more to share, thanks.
Assignee | ||
Updated•5 years ago
|
Comment 2•4 years ago
|
||
Moving this to storage, but I assume this is fixed if the pref to LSNG is enabled?
I don't think it is fixed. Chrome performs in the same way BTW. Should this be considered working as intended?
Comment 4•4 years ago
|
||
(In reply to zerolxy from comment #3)
I don't think it is fixed. Chrome performs in the same way BTW. Should this be considered working as intended?
Could you elaborate more on why you don't think it's fixed? Are you saying that you enable the dom.storage.next_gen
in "about:config" and find out that the size of storage in local storage isn't included?
We are working on turning that pref by default on all channels. At the moment, it's enabled by default on EARLY_BETA_OR_EARLIER (which means Nightly and early Beta)
You can track the status of enabling the pref by default on Release on Bug 1599979.
Sorry, my bad. Verified it was working after turning on dom.storage.next_gen.
BTW, what other features does dom.storage.next_gen provide? Is there a doc?
Comment 6•4 years ago
|
||
(In reply to zerolxy from comment #5)
BTW, what other features does dom.storage.next_gen provide? Is there a doc?
Good question! The dom.storage.next_gen provides many features and I think there are some documentations for that.
Jens, do you happen to know the links for the docs that what features does dom.storage.next_gen provide for users and developers?
Comment 7•4 years ago
|
||
Comment 8•4 years ago
|
||
You can also check dependent bugs in bug 1286798 and bug 1504142.
Updated•4 years ago
|
Comment 9•2 years ago
|
||
LSNG is now enabled by default.
Description
•