what are the different types of storage in HTML 5?

 Posted by Sagnikmukh on 5/4/2011 | Category: HTML 5 Interview questions | Views: 4848 | Points: 40
Answer:

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>


details on TechFundaHowTo : www.Techfunda.com


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Akiii on: 7/11/2011 | Points: 10
nice information....

Thanks and Regards
Akiii

Login to post response