Where is sessionstorage,localstorage,indexDb actually stored? Memory or disk?

where on earth is sessionstorage,localstorage,indexDb stored

Apr.07,2021

memory. How did you figure it out? restart the computer to see if the data is still there. You will know if it is in memory


.

sessionStorage is valid in a session, in other words, you are still alive if you close the relevant browser tags, but closing the browser completely will erase it, so there is memory.

localStorage will survive even if you close the browser, so it will be brushed to disk. The same goes for indexDB

Menu