Search code examples
google-chrome-appindexeddbweb-sqlweb-storage

Are Storage API limited in size for Google Chrome applications?


Storage APIs (IndexedDB, WebSQL, LocalStorage) are limited in size for online web applications, is this the same for packaged Google Chrome applications ?


Solution

  • There is a permission, "unlimitedStorage", that unlocks some limitations.

    There is an overview in the Apps docs: Managing HTML5 Offline Storage.

    Also, note that packaged apps can't use some of the Web Platform features, namely localStorage and friends, as well as webSql are excluded (replaced respectively by chrome.storage and IndexedDB).

    What you can use in a Chrome App:

    • chrome.storage.local
    • chrome.storage.sync (with quotas regardless of "unlimitedStorage")
    • IndexedDB
    • HTML FileSystem API for "virtual" filesystems
    • chrome.fileSystem for access to real filesystem via user prompts
    • chrome.syncFileSystem as a filesystem backed by Google Drive (obviously, limited)