Password-protect your Web pages

Q How can I put a password on my Web page so that only a privileged few can access the page?

- Stephen McNamara

A If you really want to keep people from accessing certain Web pages, now would be a good time to make friends with the person who looks after your Web server. A server provides the best password protection for your pages through a process called user authentication. Once the Webmaster locks out certain files and/or directories, a login name and password is required to access them. If an invalid login name or password is provided, the server denies access. Some Common Gateway Interface (CGI) scripts can to do the same thing, but you usually need to access the server to set one up.

If you don't have direct access to your server, your next best option is to use a JavaScript password script. This kind of password protection is not secure because users can view JavaScript code, including any password values and the URL that the correct login jumps to, from their browser. Since the page that loads after a successful login isn't password protected by your server, users can avoid the login process by jumping directly to that page. However, a JavaScript password script will provide some protection from casual users. There are numerous password scripts on the Web, and some provide better security than others. You can grab one from http://www.javascripts.com or http://www.javagoodies.com/html.html.

Join the newsletter!

Error: Please check your email address.
Rocket to Success - Your 10 Tips for Smarter ERP System Selection
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Belinda Taylor

PC World
Show Comments

Cool Tech

SanDisk MicroSDXC™ for Nintendo® Switch™

Learn more >

Breitling Superocean Heritage Chronographe 44

Learn more >

Toys for Boys

Family Friendly

Panasonic 4K UHD Blu-Ray Player and Full HD Recorder with Netflix - UBT1GL-K

Learn more >

Stocking Stuffer

Razer DeathAdder Expert Ergonomic Gaming Mouse

Learn more >

Christmas Gift Guide

Click for more ›

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Walid Mikhael

Brother QL-820NWB Professional Label Printer

It’s easy to set up, it’s compact and quiet when printing and to top if off, the print quality is excellent. This is hands down the best printer I’ve used for printing labels.

Ben Ramsden

Sharp PN-40TC1 Huddle Board

Brainstorming, innovation, problem solving, and negotiation have all become much more productive and valuable if people can easily collaborate in real time with minimal friction.

Sarah Ieroianni

Brother QL-820NWB Professional Label Printer

The print quality also does not disappoint, it’s clear, bold, doesn’t smudge and the text is perfectly sized.

Ratchada Dunn

Sharp PN-40TC1 Huddle Board

The Huddle Board’s built in program; Sharp Touch Viewing software allows us to easily manipulate and edit our documents (jpegs and PDFs) all at the same time on the dashboard.

George Khoury

Sharp PN-40TC1 Huddle Board

The biggest perks for me would be that it comes with easy to use and comprehensive programs that make the collaboration process a whole lot more intuitive and organic

Featured Content

Product Launch Showcase

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?