1

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.

Mayusu
  • 91
  • 1
  • 2
  • 11
  • Please include details of the code you've tried and where any errors are and what the errors are. If you don't have nay code yet I'm afraid that SO isn't the place to ask people to write code for you. Have a look here [ask] and here [mcve] – David Wilson Jan 25 '16 at 23:39
  • 1
    I'm not asking anyone for writing a code for me .. I am asking for advices about a particular subject, please re-read my question again, I am afraid you didn't understand. – Mayusu Jan 26 '16 at 11:44
  • Re read my answer. I said IF you don't have any code. Also asking questions which invite opinions and might provoke discussion aren't allowed – David Wilson Jan 27 '16 at 00:23

1 Answers1

2

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?

Community
  • 1
  • 1
Yoichiro Tanaka
  • 835
  • 7
  • 14
  • 1
    `chrome.storage.local` is unlimited if `"unlimitedStorage"` permission is declared, and the same _may_ apply for IndexedDB. – Xan Jan 26 '16 at 14:21