Sobes.tech
Middle

What are the limitations on the amount of memory in IndexedDB and what do they depend on?

sobes.tech AI

Answer from AI

IndexedDB is a browser database that allows storing significant amounts of structured data on the client side. The memory limits for IndexedDB depend on the browser and platform, as well as the available disk space.

Key points:

  • Percentage of free disk space: Browsers typically limit IndexedDB usage to a certain percentage of free disk space (e.g., 5-10%).
  • Differences between browsers: Limits and policies may vary in Chrome, Firefox, Safari, and Edge.
  • User permission request: When a certain threshold is reached, the browser may ask the user for permission to increase the quota.
  • Limits on individual object size: Usually, there are no restrictions on the size of individual records, but large objects can affect performance.

For example, in Chrome, the limit may be about 6% of free disk space, but these figures change and depend on the browser version and platform.

Therefore, the exact amount of memory for IndexedDB cannot be specified precisely — it depends on the browser, device, and current disk state.