1. Computing

Discuss in my forum

Password Protection

What HTML Can't Do

By , About.com Guide

Password protection is a bit more complicated than turning off right clicking or setting up simple forms. Most web servers have password protection of some type built right in, but unless your hosting provider has made it available to you, chances are you won't be able to use it.

Secure Password Protection

Password protection is only as secure as the passwords that are used, but the method used to set up the password protection is also important.

Server side password protection is the most secure. If your hosting provider allows it, you should use htaccess or server side passwords. There are many documents to help you use htaccess in my Htaccess - Password Protection links.

Use CGIs for Password Protection

The second most secure password protection for web pages is done with CGIs on a secure web server. The About.com forum login is done with a CGI backend that accesses a database of customer usernames and passwords. There are a number of Perl CGIs for password protection on the CGI Resource Index. There are also PHP scripts for password protection on the PHP Resource Index.

Password Protection in JavaScript Isn't Very Secure

Password screens done with JavaScript can be found, and often the password is stored in clear text right in the web page. But I have seen some things done with encryption that make them mildly difficult to crack. However, I wouldn't store my credit card number behind such a password.

Some JavaScript password protection scripts are at the JavaScript Source. There are over 10 different scripts you can try out to find one that will provide the protection you need. For more information about password protection in JavaScript, see the About.com Guide to JavaScript's article on password protection.

Read more of Web Design/HTML's most recent articles.

©2013 About.com. All rights reserved.