Sanjay Dixit
What are the different types of storage in HTML5?
By Sanjay Dixit in Web Development on May 09 2013
  • Sasi Kala
    Dec, 2013 3

    *LocalStorage -- stores data with no expiration date. The data will not be deleted when the browser closed.*SessionStorage -- stores data for only one session. The data is deleted when the browser is closed.

    • 1
  • Vijay K
    Dec, 2022 21

    HTML5 There are two types of web storage Api

    1. Local Storage
    2. session Storage

    Local Storage:

    1. Used to store data on client side.
    2. It has no expiration time.
    3. Data in the localStorage exists always till the user manually delets it.
      Ex:
      Setting Local Storage:
      LocalStorage.setItem(“Key”,”Value”);
      Getting Local Storage:
      LocalStorage.getItem(“Key”);

    Session Storage:

    1. Used to store data on client side.
    2. Data in the Session Storage till exists, current tab is open.
    3. If we close current tab our data will erase automatically from the session Storage.
      Ex:
      Setting Session Storage:
      SessionStorage.setItem(“Key”,”Value”);
      Getting Session Storage:
      SessionStorage.getItem(“Key”);

    • 0
  • Rudrayya Pujar
    Jul, 2016 1

    1)Local Storage:The Local Storage is designed for storage that spans multiple windows, and lasts beyond the current session. In particular, Web applications may wish to store megabytes of user data, such as entire user-authored documents or a user's mailbox, on the client side for performance reasons.2)Session Storage:The Session Storage is designed for scenarios where the user is carrying out a single transaction, but could be carrying out multiple transactions in different windows at the same time.

    • 0
  • Chiheb Chebbi
    Feb, 2015 26

    Local Storage Session Storagehttp://www.tutorialspoint.com/html5/html5_web_storage.htm

    • 0
  • Munesh Sharma
    Apr, 2014 14

    http://www.w3schools.com/html/html5_webstorage.asp

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS