Storing data in indexedDB
instead of sessionStorage
is necessary due to the size exceeding 5 MB.
I'm uncertain about the cleanup strategy. I want the data to persist during page reloads or navigation, but I'd like it removed if the user closes the browser tab to save space.
What is the best way to achieve this? It needs to be functional at least in Chrome.