Session Storage Methods with Expiry

We often need to cache the data in sessionStorage with an expiration timeout. 
Session Storage doesn't provide an expiration which is the case with cookies 

 As cookies allows only 4-5kb of datastorage. sessionStorage allows approx. 5MB of data storage.

 Below are some handy method for session storage with expiration.

Comments

Popular posts from this blog

Install Node.js without admin rights

Create a lean React Solution using Typescript

Replace all occurence of String in JavaScript