diff --git a/www/common/outer/local-store.js b/www/common/outer/local-store.js index fbda718d4..774924148 100644 --- a/www/common/outer/local-store.js +++ b/www/common/outer/local-store.js @@ -109,6 +109,13 @@ define([ delete localStorage[k]; delete sessionStorage[k]; }); + try { + Object.keys(localStorage || {}).forEach(function (k) { + // Remvoe everything in localStorage except CACHE and FS_hash + if (/^CRYPTPAD_CACHE/.test(k) || /^LESS_CACHE/.test(k) || k === Constants.fileHashKey) { return; } + delete localStorage[k]; + }); + } catch (e) { console.error(e); } LocalStore.clearThumbnail(); // Make sure we have an FS_hash in localStorage before reloading all the tabs // so that we don't end up with tabs using different anon hashes