hey ummm, can't you right click and "view source", read through and just get the password, or havee l missed the point?
dlannetts
Junior Poster in Training
84 posts since Jan 2010
Reputation Points: 10
Solved Threads: 4
if you must use javascript, javascript security is a joke
hash the password, and only put the hash in your file
then hash the entered password and compare the hashes
it is more difficult to work an md5 or sha1 backwards to get the text
security is usually configured at the server
an ajax call to verify the password, or submitting the page for server verification is preferred to anything clientside
almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
.htaccess .htpassword is less efficient than per user access control through settings stored in the database with the user details.
The reason why all access controlled sites use this method instead of .htpassword.
What we do personally, becomes irrelevant when the site is not personal, still use .htpassword to further lock admin-only folders, belt and braces approach
almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
You certainly can. That is as secure as having a guard snail on duty.
MidiMagic
Nearly a Senior Poster
3,319 posts since Jan 2007
Reputation Points: 730
Solved Threads: 182