1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Password protected Blogger blog

Discussion in 'Blogging' started by B:H:W, May 15, 2013.

  1. B:H:W

    B:H:W Newbie

    Joined:
    Mar 18, 2013
    Messages:
    24
    Likes Received:
    1
    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:
    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.