Currently, we have a WebApp which uses sessionStorage for storing values when navigating from pages. This seems to work fine on other IE, Chrome, Firefox, and Safari. But when using Private mode in Safari, it seems it is causing an error. It messed the UI showing variables we used for PUG. (ie. {{title}}, {{description}}. I think the problem is that it is throwing an error on saving the SessionStorage. Is there any workaround we can use for this one?
Below is the code for the method on LS:
app.factory("LS", function($window, $rootScope) {
return {
setData: function(key, val) {
$window.sessionStorage && $window.sessionStorage.setItem(key, val);
return this;
},
getData: function(val) {
return $window.sessionStorage && $window.sessionStorage.getItem(val);
}
};
});