|
function _save() { |
|
_dropOldEvents(); // remove expired events |
|
try { |
|
_storage_service.jStorage = JSON.stringify(_storage); |
|
// If userData is used as the storage engine, additional |
|
if (_storage_elm) { |
|
_storage_elm.setAttribute('jStorage', _storage_service.jStorage); |
|
_storage_elm.save('jStorage'); |
|
} |
|
_storage_size = _storage_service.jStorage ? String(_storage_service.jStorage).length : 0; |
|
} catch (E7) { /* probably cache is full, nothing is saved this way*/ } |
|
} |
Looking at this code, if JStorage runs out of room, it will assume IE7 and kill the exception. This should be changed to at least display a warning in the console that JStorage was unable to save because local storage is full. This would save a lot of time.
jStorage/jstorage.js
Lines 459 to 470 in 5f4075a
Looking at this code, if JStorage runs out of room, it will assume IE7 and kill the exception. This should be changed to at least display a warning in the console that JStorage was unable to save because local storage is full. This would save a lot of time.