Hi,
I want to password protect my blog but the main page only. The user should enter a password before he can access my blog.
I have tried the following Javascript. However, when I implement this the password question pops up on every site and post:
How can I change this so that the user must fill the password only once?
Would be great if someone can help.
I want to password protect my blog but the main page only. The user should enter a password before he can access my blog.
I have tried the following Javascript. However, when I implement this the password question pops up on every site and post:
Code:
<SCRIPT LANGUAGE="JavaScript">
var password = 'test'
password=prompt('Please enter the password to enter this site:','');
if (password != 'test') {
location.href='my blog address';
}
</SCRIPT>
How can I change this so that the user must fill the password only once?
Would be great if someone can help.