You can use localStorage since Nurdin said this is not the case.
Read more about this here.
http://www.w3schools.com/html/html5_webstorage.asp
, so you have to set a condition to check if the user is logged in or not before the login page, i.e.
if(window.localStorage.getItem("loggedIn") == 1) {
}
else
{
}
On the login page after a successful login.
window.localStorage.setItem("loggedIn", 1);
window.localStorage.setItem("username", document.getElementsByName("usernametextbox").value);
etc..
On the logout page, clear this local storage.
window.localStorage.removeItem("loggedIn");
window.localStorage.removeItem("username");
source
share