Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

What is difference between session storage and local storage?

user-image
Question ajoutée par Syed Kamran Hyder , Senior UI/UX / Web & Graphic Designer / SharePoint Designer , Saudi Basic Industries Corporation (SABIC)
Date de publication: 2014/02/09
Shahid Riaz Bhatti
par Shahid Riaz Bhatti , Principal Software Engineer (Team Lead) , Sunstar Technologies Pvt Ltd

localStorage and sessionStorage both have different scope.

sessionStorage is accessible only by the window which created it and only for that span of time while the window which created is open.

 

On the other hand, localStoarge is something which is available to the user even if user close the window and then open it again.

 

So main difference is the expiry of the values which are stored in these stoarge.

muhammad  mubeen
par muhammad mubeen , Senior UI / UX Designer , Flowershop.ae

The only difference is that localStorage has a different expiration time sessionStorage will only be accessible while the window that created it is open. localStorage lasts until you delete it or the user deletes it

Jose Jr Dagohoy
par Jose Jr Dagohoy , System Operator , The Shared Electronic Banking Services Incorporated (KNET Kuwait)

Session storage are data that resides on the server which client are accessing while the local storage are on the client storage and typically it is more faster on caching or accessing those files by an application.

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?