i have this javascript password protect on a page in my site and when i click on a link on that page and go back it makes me type in the password again to access the page. how can i make it so that it will remember me (and wont make me login everytime i go to the page) until i close my browser or leave the website.
heres the javascript:
Code:
<script type="text/javascript">
var password;
var pass1 = "password"; // place password here
password=prompt("Please Enter the Password","");
if (password==pass1)
alert('Password is Correct!'); // file to open if password is correct
else {
window.location= "index.html"; // file to load if password is incorrect
}
// End -->
</script>