snipt

Ctrl+h for KB shortcuts

Text only

Estimate Localstorage used space

1
2
3
4
5
In your console:
JSON.stringify(localStorage).length (value in bytes, so 2636625 == 2.51448 MB)

Info on quota: http://www.html5rocks.com/en/tutorials/offline/quota-research/
More on mobile: http://dev-test.nemikor.com/web-storage/support-test/
https://snipt.net/embed/17f56da2252e67448df62ae077daff23/
/raw/17f56da2252e67448df62ae077daff23/
17f56da2252e67448df62ae077daff23
text
Text only
5
2016-12-04T21:59:28
True
False
True
Feb 10, 2014 at 05:50 AM
/api/public/snipt/112324/
estimate-localstorage-used-space
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>In your console: </span><span id="L-2"><a name="L-2"></a>JSON.stringify(localStorage).length (value in bytes, so 2636625 == 2.51448 MB) </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>Info on quota: http://www.html5rocks.com/en/tutorials/offline/quota-research/ </span><span id="L-5"><a name="L-5"></a>More on mobile: http://dev-test.nemikor.com/web-storage/support-test/ </span></pre></div> </td></tr></table>
localstorage, quota, weight