If you want to "protect" a site and don't have CGI access, you can try this JavaScript. Visitors get three tries to enter the correct password then they are refused entry. Note: The password is: password.
Add the below code to the <body> section of your page:
<scriptlanguage="javascript"type="text/javascript"> /* Visit http://www.yaldex.com/
for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin function
password(){ var
testV =1; var
pass1 =prompt('Please
Enter Your Password',''); while(testV
<3){ if(!pass1) history.go(-1); if(pass1
=="password"){ alert('You
Got it Right!');
<!-- STEP TWO: Change
protectedpage.html to your protected page -->
// Change the following URL to your protected filename