Chrome Extension and a Client-Side Database

1.6k views Asked by At

I'm creating a Chrome Extension that needs to store some data for each user in a database .. for this, I used first Java Servlets to connect to a MySQL database and use it, but it's not very adequat in my case : I want to store the client data in a client database, not in the server.

I googled that looking for a solution and I found a lot of technologies that provide that, but I am still confused with all the results I got. Can anyone help me in this ? I need some advices.

Thank you very much in advance.

1

There are 1 answers

1
Yoichiro Tanaka On BEST ANSWER

It depends on the data size you want to store. If it is less than about 100KB, you can use chrome.storage.sync API. Also, if it is less than about 5MB, you can use chrome.storage.local API. Both APIs are simple key-value store. Also, you can use LocalStorage and SessionStorage.

If you want to get more large DB, you may use IndexedDB. The available size will be changed dynamically. See: What are the storage limits for the Indexed DB on Google's Chrome browser?