WHAT ARE THE DIFFERENT TYPES OF STORAGE IN HTML 5?

Arun Singh

Total Post:310

Points:1550
Posted by  Arun Singh
HTML5 
 4367  View(s)
Ratings:
Rate this:
  1. Arun Singh

    Post:310

    Points:1550
    What are the different types of storage in HTML 5?

    HTML5 offers two new objects for storing data on the client:

    LocalStorage - stores data with no time limit

    <script type="text/javascript">
        localStorage.lastname="Smith";
        document.write(localStorage.lastname);
    </script>

    SessionStorage - stores data for one session.The data is deleted when the user closes the browser window.

    <script type="text/javascript">
            sessionStorage.lastname="Smith";
           document.write(sessionStorage.lastname);
    </script>

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!