Test of localStorage limits/quota using bisection algorithm
I wrote this simple code that is testing localStorage size in bytes.
const check = words => {
try {
localStorage.clear();
localStorage.setItem('a', '0'.repeat(words));
localStorage.clear();
return true;
} catch(e) {
localStorage.clear();
return false;
}
};
Github pages:
https://gkucmierz.github.io/Test-of-localStorage-limits-quota/
I have the same results on desktop chrome, opera, firefox, brave and mobile chrome which is ~5Mbytes
And half smaller result in safari ~2Mbytes