So, I'm running a vue application with quasar inside an iframe and while using localStorage, I noticed something strange. When I turn off my connection the application works just fine, because I still have data on localStorage, but when I refresh the page, it returns a browser error and it shows that I can't access that because obviously I'm out of a connection, and it shows that because I lost everything that I had on localStorage.
The thing is I'm still new at this localStorage thing, but I did a lot of research about it and I read about having localStorage even when I close the browser and open it again.
My question is: localStorage should stay after I lost my connection and refresh the page or it works like that? Losing it? and if not, why is this happening? This is more a conceitual question, that's why I didn't post any code, I need to understand the actual behavior that I should see in this case.
For sure it stays. We have an application with a fully functioning offline mode using localStorage and appCache. You will need to grub down. Open your devTools. What do you see in Application => localStorage? How are you expecting the page resources to be available offline (appCache or serviceWorker)? Are there errors in the console? In the network tab? Theoretically this can work.