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

Posted on    September-06-2012 1:03 AM

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

Arun Singh

Total Post:310

Points:1550
Posted on    September-06-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