·: Site description :·
Welcome!

NetBulge.com provides code, scripts, tips & tricks and general information about web development aimed to help webmasters and web designers.

Instead of packing all the info we can get into a huge database, our goal is to produce a high quality compilation of code snippets and articles. Web developers will find in these pages a fresh and savvy view of most of the issues concerning programming and designing for the web; as well as a good site to visit regularly for help and inspiration.

Enjoy!
Zones
Navigation
Search

Sessions

NetBulge.com RSS2 feed



About Hosting:

I use and recommend Hostgator for all my hosting needs. It is the only company I have tried (and I have tried plenty) that hasn't given me a headache and responds quickly and fairly to everything I ever need. I run 3 accounts that host over 20 sites with Hostgator and I am happy recommending it to all my family, friends and clients. If you are looking for a cheap yet solid host, IMO Hostgator is the way to go. I do get a comission if you register through the link, but even if you don't like me and don't want me to get a comission, go to Hostgator for your hosting needs and save yourself plenty of cash and headaches.


 Print version Send article via e-mail  

Password protect a webpage using only HTML


web zone resourcesI’ve been asked this continuously. The quick response people get is: there is no way to accurately protect your site without the use of server side scripting.
But actually there is one way to password protect a page using only HTML (and a little client side scripting). It is a dirty little trick but serves the purpose of genuine security without using any server side scripting at all.


This is how it works:

Rename the page you want to protect to be the password, for example: mypassword.htm.

Now, in the entry page, have an input box for the password and a javascript that navigates the browser to whatever is typed in the input box plus the htm extension (“.htm”).

So, when your visitor types “mypassword” in the box, your script loads “mypassword.htm” and the visitor is in. If any other word is typed in as a password the request will return a 404 error (page not found).

This would definitely not be my main approach to password protection, but if you are only looking to quickly protect a page without complicating yourself with finding a PHP host, it will do the trick just fine.




Author : Esopo, Read 5775 times, Comments: 3
Rating :  rating resourcesrating resourcesrating resourcesrating resourcesrating resourcesrating resourcesrating resourcesrating resourcesrating resourcesrating resources  |  Tuesday, 19. April 2005

Add new comment/Comments
Your rating :   Poor ranking resourcesrating resourcesrating resourcesrating resourcesrating resources Excellent




css stylescss stylesDo you have something to say?
Then say it! NetBulge.com is devoted to web development. We are always looking for fresh and relevant ideas. If you are a web designer with a voice, this is the place to make it heard. Join us!

Featured *
Need I say anything? - The best browser out there, period. A well designed efficient interface is only the beginning here; web safety and a truck load of good extensions are the turning point. If you haven’t tried it yet, you are seriously missing out.

Web design, web development, technical communication, and IT made simple for both professionals and non-geeks.
http://www.christopherjason.com