I was trying not to use database but the browser local-storage for a login example. I mean when user give 'username' and 'password' it will check from browser local-storage and then be able to login. I am using localStorage.setItem and localStorage.getItem of HTML5 to get the data and show it. Here is my Code-
var user_name=document.getElementById('userName').value;
var user_pswd=document.getElementById('password').value;
localStorage.setItem("user", user_name);
localStorage.setItem("pass", user_pswd);
// Retrieve
document.getElementById("output").innerHTML = localStorage.getItem("user");
It set the data and shows the user name,But is it possible to get the data after restarting the browser?? When I try to login for first time, how can I check with the browser data? Please any help is highly appreciated..