I need to keep some data in indexedDB
instead on sessionStorage
as amount of data is more than 5 MB.
I'm confused about cleanup strategy as in case of page reload or navigation to the other page I need this data to be kept, but if user closes browser tab I'd like to remove it to save place.
How can I do that? Need it to be working at least in Chrome.