diff --git a/dashboard-ui/scripts/extensions.js b/dashboard-ui/scripts/extensions.js index af154e2b4c..8b3b8a107a 100644 --- a/dashboard-ui/scripts/extensions.js +++ b/dashboard-ui/scripts/extensions.js @@ -21,6 +21,17 @@ $.fn.checked = function (value) { } }; +function IsStorageEnabled() { + try { + localStorage.setItem("__test", "data"); + } catch (err) { + if ((err.name).toUpperCase() == 'QUOTA_EXCEEDED_ERR') { + return false; + } + } + return true; +} + if (!Array.prototype.filter) { Array.prototype.filter = function (fun /*, thisp*/) { "use strict"; diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index 3e0c2e0e95..9132b300a8 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -1113,6 +1113,10 @@ $(function () { alert("This browser does not support web sockets. For a better experience, try a newer browser such as Chrome (android, desktop), Firefox, IE10, Safari (iOS) or Opera."); } + + if (!IsStorageEnabled()) { + alert("This browser does not support local storage or is running in private mode. For a better experience, try a newer browser such as Chrome (android, desktop), Firefox, IE10, Safari (iOS) or Opera."); + } }); Dashboard.jQueryMobileInit();