Back to JS main page

BY:Mattias Sjoberg...Homepage
DATE:1997-01-20
UPDATED:1997-05-19, Ryan made it work in Internet Explorer as well.


COMMENTS:
I've had many questions about how to make a password protected page with JavaScript. So I thought I'll share my solutions and opinions on the subject, feedback is very welcome!

You can't make a bullet proof protection with javascript, but you can make a solution that will prove satisfactory in most cases. This solution is for those pages where you can't look in the directories, like GeoCities, if you type the directory name i.e http://www.oocities.org/SiliconValley/7116, index.html would automatically be loaded.

If you name the file a6g5d8s0.html (password=a6g5d8s), it would take a while of trying before anyone would figure it out! Right?

To use this script create one file where you have this script (i.e login.html). Then call the "secret" file whatever you want (i.e a6g5d8s0.html), the password would then be (i.e a6g5d8s0)! There is no need to change anything in the script!


Enter password

If you want this script just choose "Save Frame As..." (in Netscape) when you have the focus on the frame.

URL: http://www.oocities.org/SiliconValley/7116/jv_pswr3.html