ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is difference between session storage and local storage?

user-image
تم إضافة السؤال من قبل Syed Kamran Hyder , Senior UI/UX / Web & Graphic Designer / SharePoint Designer , Saudi Basic Industries Corporation (SABIC)
تاريخ النشر: 2014/02/09
Shahid Riaz Bhatti
من قبل 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
من قبل 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
من قبل 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.

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟