en.javascript.info
en.javascript.info copied to clipboard
localStorage/sessionStorage
It says, sessionStorage is destroyed after closing a tab, but that's not fully correct. At least for Chrome.
Restoring the tab, with CTRL + SHIFT + T (to restore tabs, closed recently) restores also the sessionStorage for this tab. This works at least in Chrome 79 and maybe some other chromium based browsers, but not Firefox. Only a restart clears this on Chrome for sure.
I'm not sure if this is a issue or just a bit more comfort a chromium browser offers, but it may deserve a note in the article.
When you restore a closed tab, its session is recovered also. No contradiction.
There's the same with other JS stuff.