Tuesday, 13 October 2020

session storage on browser

Guess its too late to answer but for anyone else, the session storage that is shown in chrome dev tools is HTML5 sessionStorage and not the server side Session.


With web storage, web applications can store data locally within the user's browser.

Before HTML5, application data had to be stored in cookies, included in every server request. Web storage is more secure, and large amounts of data can be stored locally, without affecting website performance.

Unlike cookies, the storage limit is far larger (at least 5MB) and information is never transferred to the server.

Web storage is per origin (per domain and protocol). All pages, from one origin, can store and access the same data.



  • According to this, sessionStorage is limited only by available system memory in Chrome. However, see my answer update. – Robert Harvey Apr 5 '13 at 18:35 



  • https://stackoverflow.com/questions/20170381/what-is-session-storage-in-chrome-developer-tools

  • https://stackoverflow.com/questions/15840976/how-large-is-html5-session-storage

  • http://www.gwtproject.org/doc/latest/DevGuideHtml5Storage.html





  • size:



  • var data = 0;
    for(var v in window.sessionStorage){
     data += window.sessionStorage.getItem(v); 
    }
    
    console.log(data);//.length to get char length

  • https://stackoverflow.com/questions/11613604/how-to-get-total-html5-storage-size-used-by-current-application





 

No comments:

Post a Comment