Click to See Complete Forum and Search --> : Writing to a webpage in large amounts
Deathly809
10-10-2003, 01:34 PM
I have a webpage where I dont want anyone to read what is said unless they have a password. I have set up a password and a cookie that is set from the login page if the password is correct. When you disable JavaScript you can just open the webpage without logging in. I was wondering if I could use document,write("Lots of crap"); and when they disable JavaScript they cant view my webpage.
Dimitri
10-10-2003, 02:06 PM
To effectively prevent uses from accessing restricted content, you should consider password protecting on the server side (not on the client side).
Many of today's web hosting companies offer online tools that allow you to password-protect your website's directories. Email and ask your web host if they offer such tools.
If they don't, I suggest you migrate your website to a web host that does (most major web hosts offer these tools in their business accounts, by default, and often cost as little as $15/month.)
Good luck.
Dimitri
Deathly809
10-10-2003, 02:09 PM
angelfire :(
Dimitri
10-10-2003, 02:23 PM
I'd rather have you hate me for telling you the truth, then have you love me for telling you otherwise :)
My suggestion isn't as daunting as it sounds. Most major hosts (like http://webhosting.yahoo.com for example) provide very easy-to-use online tools that guide you through the simple process of creating and assigning passwords to your site's directories.
If my momma can do it, so can you.
Dimitri
jbergthorson
10-10-2003, 03:22 PM
you could use that document.writeln(lotsacrap) but even then the user can still read it... just right click and go view source ;)
I would do what dimitri suggests... you cannot apply security to a document that is already on the client side. He/she already has all the information!
i have heard of someone who had cgi abilities, but not password protection, to make a tiny cgi program in C. All it did was do the writeln thing but in C. Because it was a CGI program that checked the authentication, and it is compiled, the user has no way of getting at that info unless he supplies a correct username and password, or he hacks the compiled CGI script.
but that is not really the way to do things anyways.
Deathly809
10-10-2003, 09:54 PM
lol, now I have to figure out CGI lol