What is the size limit of Indexeddb technology?

Asked

Viewed 205 times

5

Today at work they mentioned the technology IndexedDB to solve a problem here in the company, but Between several questions arose me, being one of them:

What is the data limit that can be stored in an Indexeddb?


Still related to the size of the BD:

  • There is a differentiated limit between browsers?
  • Do you need permissions to use the same as other technologies? (e.g., Notification API )
  • It is possible to save files, images, music, etc...?
  • Is the database persistent? Remains after closing the browser window? If yes, it is not in danger of being considered as a temporary file being deleted by external software later?

1 answer

5


There is a differentiated limit between browsers?

This is implementation detail and changes in each browser, where it’s running and even at the time. Don’t work with it. Today it is common to limit 6% of the total storage available. In general your application can only use 20% of this, but remember that this is not the same in all cases.

Do you need permissions to use the same as other technologies? Ex: Notification API

Yes, of course, any feature of the machine needs authorization. It may have to ask for more space, it does not need to be given space at once. But it is possible in some cases to ask for unlimited access. Remember, it depends.

It is possible to save files, images, music, etc.?

In theory yes, but it was not created for this, do not treat it as a complete database.

Is the database persistent? Remains after closing the browser window? If yes, it is not in danger of being considered as a temporary file being deleted by external software later?

In general it is possible, but it is implementation detail, but it is not something that you have a lot of control, can be changed by other ways, deleted, anyway, do not treat as a database. It is not temporary, but it is not something you should trust. The default is to be temporary.

Remember that developing for web, contrary to what people think, is not doing once and runs anywhere. Each browser is a different platform, even different depending on the platform it is running. If you need all this control, you should not use web, you need a native application. Use the right tool.

Carro com cavalo dentro

  • I fully agree with you, I started today to explore Indexeddb to assess the need/advantage in applying it to future problems and found it interesting to share in SOPT some "doubts". I am waiting for new answers. BTW I loved the image of the end, sums up your reply huauau.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.