How much time do I have to save data to local storage when browser visibility changes to hidden?
I want to save page data to local storage upon tab close or reload. I am saving data upon visibilitychange event to hidden
. I’ve read this is the recommended way to do so per Page Lifecycle API and the article Don’t lose user and app state, use Page Visibility.