WHAT IS THE SESSIONSTORAGE OBJECT IN HTML5 ? HOW TO CREATE AND ACCESS ?

AVADHESH PATEL

Total Post:257

Points:1285
Posted by  AVADHESH PATEL
HTML5 
 4153  View(s)
Ratings:
Rate this:
  1. AVADHESH PATEL

    Post:257

    Points:1285
    What is the sessionStorage Object in html5 ? How to create and access ?

    The sessionStorage object stores the data for one session. The data is deleted when the user closes the browser window. like below we can create and access a sessionStorage here we created "name" as session
    <script type="text/javascript">
    sessionStorage.name="PCDS";
    document.write(sessionStorage.name);
    </script>

Answer

NEWSLETTER

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