What is Local Storage in Web Application?

What Is Windows.LocalStorage?

 
The Local storage mechanism spans multiple windows and persists beyond the current session. The Local Storage attribute provides persistent storage areas for domains. It allows Web applications to store nearly 10 MB of user data. Web Application Can Store Data Locally in users' browsers. local storage the same as cookies, sessions in web applications.
 
Local Storage Without affecting web application performance. Local Storage is more secure. It can store large amounts of data.(10MB). Local Storage can store one page that can access web application All pages. Each And Every domain its own local storage variable.
  1. To Set Local Store in web application then you can use below syntax,
     
    Syntax: Windows.localStorage.setItem(Variable,value);
     
  2. To get Local Storage  value,
     
    Syntax: Windows.localStorage.getItem(Variable,);
     
  3. To Remove Value in Local Storage Variable,
     
    Syntax: Windows.localStorage.removeItem(Variable,);
Example:
  1. <html>  
  2.     <script type="text/javascipt">    
  3.     windows.onload = setValue; function setValue(){ windows.localStorage.setItem("UserName","Kamal Bhagat") } function onClick(){ document.getElementById("txtUserName").text = windows.localStorage.getItem("UserName") }    
  4. </script>  
  5.     <body>    
  6.     Username:    
  7.         <input type="text" id="txtUserName">  
  8.             <br>  
  9.                 <input type="submit" value="click" onclick="setValue();">  
  10.                 </body>  
  11.             </html>     
More Information About Below Link You can See: