diff --git a/app/assets/javascripts/discourse/lib/key_value_store.js b/app/assets/javascripts/discourse/lib/key_value_store.js index 17d17c76a3e..ecb1651eb92 100644 --- a/app/assets/javascripts/discourse/lib/key_value_store.js +++ b/app/assets/javascripts/discourse/lib/key_value_store.js @@ -10,9 +10,13 @@ var safeLocalStorage; try { - safeLocalStorage = localStorage; + safeLocalStorage = localStorage; + if (localStorage["disableLocalStorage"] === "true") { + safeLocalStorage = null; + } } catch(e){ // cookies disabled, we don't care + safeLocalStorage = null; } Discourse.KeyValueStore = {