IndexedDB Storage Scope

Viewed 153

I have few questions about IndexedDB Storage Scope:

  • Does a PWA on Web Browser (Chrome / Mozilla) will use the same instance of IndexedDB as that of PWA added to the screen?
  • Will the data persist in Indexed DB before & after adding to the Home Screen?
  • If IndexedDB is browser specific, how to persist the data across the app opened in multiple browsers which are using the same IndexedDB?
1 Answers
  • Yes, both the PWA and the browser have access to the same data as part of the same-origin policy (example with localstorage - tested it by creating indexeddb)
  • Yes, the data is shared between app and browser - because PWAs run in the browser
  • You would need a server side solution for synchronizing data between browsers
Related