aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-15 21:12:40 +0000
committerMario <mario@mariovavti.com>2019-11-15 21:12:40 +0000
commitef75d27afbbee4cfe7d4441269e350b8f7f432f9 (patch)
treef110e1deeeeea761ba5fcf86c8bb48491a138ceb /view/js
parent965c51c2d45a98db10543c5108ac486e4fc6459e (diff)
downloadvolse-hubzilla-ef75d27afbbee4cfe7d4441269e350b8f7f432f9.tar.gz
volse-hubzilla-ef75d27afbbee4cfe7d4441269e350b8f7f432f9.tar.bz2
volse-hubzilla-ef75d27afbbee4cfe7d4441269e350b8f7f432f9.zip
cleanup local and session storage on channel change or logout
Diffstat (limited to 'view/js')
-rw-r--r--view/js/main.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/view/js/main.js b/view/js/main.js
index f15636a35..19e73c1d2 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -33,14 +33,14 @@ var sse_partial_result = false;
// take care of tab/window reloads on channel change
if(localStorage.getItem('uid') !== localUser.toString()) {
+ localStorage.clear();
+ sessionStorage.clear();
localStorage.setItem('uid', localUser.toString());
}
window.onstorage = function(e) {
if(e.key === 'uid' && parseInt(e.newValue) !== localUser) {
if(window_needs_alert) {
window_needs_alert = false;
- localStorage.clear();
- sessionStorage.clear();
alert("Your identity has changed. Page reload required!");
window.location.reload();
return;