google-chrome-extensiongoogle-chrome-storage

What happens when chrome.storage gets filled to capacity?


What is the default behavior when a Chrome extension fills chrome.storage.local/sync to capacity?

Is there a good strategy for automatically deleting things on a FIFO basis?


Solution

  • sync:

    https://developer.chrome.com/docs/extensions/reference/storage/#property-sync

    QUOTA_BYTES 102400

    The maximum total amount (in bytes) of data that can be stored in sync storage, as measured by the JSON stringification of every value plus every key's length. Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError.


    local:

    https://developer.chrome.com/docs/extensions/reference/storage/#property-local

    QUOTA_BYTES 5242880

    The maximum amount (in bytes) of data that can be stored in local storage, as measured by the JSON stringification of every value plus every key's length. This value will be ignored if the extension has the unlimitedStorage permission. Updates that would cause this limit to be exceeded fail immediately and set runtime.lastError.