How To Use Local Storage

Local Storage, web applications can store user browsing data locally. Local storage can store large quantities of data locally, Cloud Storage, use as multiple language and currency etc. Now I’m demonstrating how Local Storage data can be set and receive.

In this example you can click on button and store input box data in Local Storage.


	Web Storage example:
	<br />
	<div id="divDataLocalStorage"></div>
	<br />
	<input type="text" id="txtboxFooExampleLocalStorage" />
	<input type="button" id="SaveToLocalStorage" value="Save Text to Local Storage" />
<script src=""></script>
  <script type="text/javascript">
    $("#SaveToLocalStorage").click(function () 
       var txtboxFooValue = $("#txtboxFooExampleLocalStorage").val();
       localStorage.setItem('LocalStorageKey', txtboxFooValue);
      function RetrieveFromLocalStorage() 
        var retrivedValue = 'None';
        var retrivedValue = localStorage.getItem('LocalStorageKey', retrivedValue);

Leave a Reply

Your email address will not be published. Required fields are marked *