Home > DeveloperSection > Interviews > What is the sessionStorage Object in html5 ? How to create and access ?

Posted on    October-20-2012 8:08 AM

 HTML5 HTML5 
Ratings:
 1 Answer(s)
  3856  View(s)
Rate this:

AVADHESH PATEL

Total Post:257

Points:1285
Posted on    October-20-2012 12:00 AM

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>

Don't want to miss updates? Please click the below button!

Follow MindStick