What is the size limit of IndexedDB technology?

5

Today at work, I mentioned the IndexedDB technology to solve a problem here in the company, but there were several doubts, one of them being:

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

Still related as DB dimension:

  
  • Is there a different boundary between browsers?
  •   
  • Do you need permissions to use the same as other technologies? (eg, Notification API)
  •   
  • Is it possible to save files, images, music, etc ...?
  •   
  • Is the database persistent? Does it remain after closing the browser window? If so, does it run the risk of being considered a temporary file being deleted by external software later?
  •   
    
asked by anonymous 21.08.2018 / 16:41

1 answer

5
  

Is there a differential boundary between browsers?

This is implementation detail and changes in every browser, where it is running and even of the time. Do not 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 equal in all cases.

  

Do you need permissions to use the same as other technologies? (eg, the notifications API)

Yes, of course, any feature on the machine needs authorization. You may have to ask for more space, you do not have to be given space at one time. But it is possible in some cases to ask for unlimited access. Remember, it depends.

  

Is it possible to save files, images, music, etc ...?

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

  

Is the database persistent? Does it remain after closing the browser window? If so, does it run the risk of being considered 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 much control over, it can be altered in other ways, deleted, in other words, do not treat like 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, including it is different depending on the platform it is running. If you need this whole control, you should not use web, you need a native application. Use the right tool.

    
21.08.2018 / 17:00