0

It seems MS Edge allows extensions to store maximum 1MB data per storage item according to this answer. But I need more storage. So I thought maybe I can store a JSON string in different storage items by splitting it. For example, say I have following JSON string:

[{"key1":"value1"}]

Now, if I split this string into two I'll get:

chunk 1: [{"key1":
chunk 2: "value1"}]

And I will store these chunks in different storage items as following:

chrome.storage.sync.set({
    chunk1: `[{"key1":`,
    chunk2: `"value1"}]`
});

So now I will get more storage (+1MB i guess).

But I'm not sure if this is the right approach. Can anyone tell me if this approach is okay or there's a better way to do it?

  • 1
    The answer you refer to is based on Edge Legacy. For nowadays Edge Chromium browser, you can refer to [Storage quotas for sync data](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/storage/sync#storage_quotas_for_sync_data) about the limit of the size. To go over the limit, you can refer to [this thread](https://stackoverflow.com/questions/29732514/storage-quota-for-chrome-storage-sync) and [this thread](https://stackoverflow.com/questions/67353979/algorithm-to-break-down-item-for-chrome-storage-sync) for more information. – Yu Zhou Mar 01 '22 at 03:57

0 Answers0