code: function isLocalStorageAvailable() {
  	if(typeof localStorage === "object") {
  		try {
  			localStorage.setItem("smde_localStorage", 1);
  			localStorage.removeItem("smde_localStorage");
  		} catch(e) {
  			return false;
  		}
  	} else {
  		return false;
  	}
  
  	return true;
  }
docs: Safari, in Private Browsing Mode, looks like it supports localStorage but all calls to setItem throw QuotaExceededError. We're going to detect this and set a variable accordingly.