How can I transfer data from a Google extension popup window to a database?

I need help with a Google extension. It records how long you are at a website and displays it in a popup. I would like to take that information and store it so that users can review their browsing habits. I read that connecting it to a database is too risky for a man-in-the-middle attack. What would be the best method to do this? I read that using IndexedDB would be a good alternative but I cannot find much information on how to specifically modify my code to connect to that. I am new at this, so I know that this question may be a bit simplistic.

Read and write json data in javascript with a chrome extention?

How can I read and write json data in javascript? I’m making a chrome extention that will read and write json and so far couldn’t figure out how to do it.
I have a .json file in my chrome extention directory that I want to read and write data to

For example: If I had this code

    "members": {
        "Thing": {
            "someValue": "1",
            "anotherValue": "2"

How could I read “someValue” from it?
or how could I make “anotherValue” equal to 3?

Any help is appreciated!

Chrome extension- JavaScript to retrieve data from MySQL database and display in extention

we are creating a chrome extension that can able to retrieve a data from MYSQL database and display in it possible? second question is it possible to authenticate localhost .aspx website from java script.

Does clearing browser cache mean clearing extension data?

I’m considering hiring a developer from to build my chrome extension. He was saying he would need to build it using local storage, but I questioned him and asked why he couldn’t use the API. His response was that if the user clears the browser cache, it would clear everything saved in the extension. That didn’t seem right to me but I wanted to ask you all.