title: How to get total html5 storage size used by current application
body: <p>I need a way to find the total size taken by an application using HTML5 <code>sessionStorage</code>/ <code>localStorage</code> at run time.</p>
  
  <p>I don't want profiler-based approaches.</p>
  
  <p>What I'm currently doing is - </p>
  
  <pre><code>var data = 0;
  for(var v in window.sessionStorage){
   data += window.sessionStorage.getItem(v); 
  }
  
  console.log(data);//.length to get char length
  </code></pre>
  
  <p>And then I copy-paste this value into a text-file and check the size.</p>
  
  <p>Ugly and still doesn't help me either. Is there a way (any method) in the HTML5 API's that have this in-built?</p>
  
  <p>Thank you.</p>