DEV Community

Discussion on: How to temporarily store API response?

Collapse
 
nektro profile image
Meghan (she/her)

In this case I would use sessionStorage since if empties after the tab closes but is persistent between refreshes and history changes. With this, the only consistency would come from a user creating a file/folder in their Drive while they had your site open. And since there's no way for you to get a postMessage from drive.google.com then that's about as close as you can get.

Collapse
 
swadhwa16 profile image
Sumit Wadhwa • Edited

Thanks Sean. BTW, how big of a data can be stored in sesssionStorage? So, let's say, if I had an object of at least 60 list items with each item holding a minimum of 4-5kb of data, would it still be appropriate to leverage sessionStorage.

Collapse
 
nektro profile image
Meghan (she/her)

The maximum capacity for sessionStorage ranges from about 5-10 MB depending on the browser.