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 PC World newsletter!

Error: Please check your email address.

Our Back to Business guide highlights the best products for you to boost your productivity at home, on the road, at the office, or in the classroom.

Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Belinda Taylor

PC World
Show Comments

Essentials

Microsoft L5V-00027 Sculpt Ergonomic Keyboard Desktop

Learn more >

Lexar® JumpDrive® S57 USB 3.0 flash drive

Learn more >

Mobile

Lexar® JumpDrive® S45 USB 3.0 flash drive 

Learn more >

Exec

Audio-Technica ATH-ANC70 Noise Cancelling Headphones

Learn more >

HD Pan/Tilt Wi-Fi Camera with Night Vision NC450

Learn more >

Lexar® JumpDrive® C20c USB Type-C flash drive 

Learn more >

Lexar® Professional 1800x microSDHC™/microSDXC™ UHS-II cards 

Learn more >

Budget

Back To Business Guide

Click for more ›

Most Popular Reviews

Latest News Articles

Resources

GGG Evaluation Team

Michael Hargreaves

Windows 10 for Business / Dell XPS

I’d happily recommend this touchscreen laptop and Windows 10 as a great way to get serious work done at a desk or on the road.

Aysha Strobbe

Windows 10 / HP Spectre

Ultimately, I think the Windows 10 environment is excellent for me as it caters for so many different uses. The inclusion of the Xbox app is also great for when you need some downtime too!

Mark Escubio

Windows 10 / Lenovo Yoga

For me, the Xbox Play Anywhere is a great new feature as it allows you to play your current Xbox games with higher resolutions and better graphics without forking out extra cash for another copy. Although available titles are still scarce, but I’m sure it will grow in time.

Kathy Cassidy

STYLISTIC Q702

First impression on unpacking the Q702 test unit was the solid feel and clean, minimalist styling.

Anthony Grifoni

STYLISTIC Q572

For work use, Microsoft Word and Excel programs pre-installed on the device are adequate for preparing short documents.

Featured Content

Latest Jobs

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?