1. Home
  2. Computing & Technology
  3. Web Design / HTML

Password Protection

What HTML Can't Do

By Jennifer Kyrnin, About.com

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 seen, but I have seen some things done with encryption that make them fairly 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.

What Else HTML Can't Do

Previous Features

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. Web Server Management
  5. Security
  6. Password Protection - Protect Files and Fold

©2008 About.com, a part of The New York Times Company.

All rights reserved.