This is a tutorial where you will find out how to make a Javascript password protection more secure by tricking hackers. You will also learn how to make a script which allows you to have multiple login accounts, with different usernames and passwords.
If the visitor is able to find the "View Source" menu item in his browser he is extremely dangerous hacker who can penetrate through all your JavaScript password protection systems cause you store the password in your source HTML code... But the technique described here is a real and simple JavaScript solution to protect a page from being viewed. Visitors will get nothing from your source text.
It uses the a prompt for the user to input a password or request. The page is dynamically built based on the the user response. It uses an external *.js file (If referenced directly, it will download) that contains arrays to build the page. You should not rely on this for secure pages, but give a good example for low in content management. It's a bit clunky, but shows how to use to create dynamic page changes. I have used an external *.js file for site navigation.
This tutorial explains how to create a simple, useful password authentication system using JavaScript. Useful if your site requires a quick password protection solution, but not a top-level security feature.