Is getify.store error or catch exception fixed when the local storage limit is exceeded?

Is there a way to check if the local storage limit is exceeded after such a call:

amplify.store("key", object); 

What happens if I try to save something more than the local storage limit?

+5
jquery amplifyjs
Sep 20
source share
1 answer

yes, it gives "exceeded amplify.store quota", as you can see here

 store.error = function() { return "amplify.store quota exceeded"; }; 

...

 try { storage.setItem( key, parsed ); // quota exceeded } catch( error ) { // expire old data and try again store[ storageType ](); try { storage.setItem( key, parsed ); } catch( error ) { throw store.error(); } } 
+8
Nov 09
source share



All Articles