473,395 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Protecting webpages and/or folders...

Hi, I have a question...

I inserted a javascript into my index file for my webpage to password
protect. With the successful login, your get the intended page. But,
because the page that was directed from the login can be accessed by
typing in the URL (or google scans it), how do I make it so that that
page always asks for the username/password. Am I able to make a folder
containing all the pages that I want protected and that won't be
accessible by everyone on the net? I am not a programmer by any means
and I'm sorry if this doesn't make a whole lot of sense... Thank you
for your time...

Apr 15 '06 #1
6 980
wrote on 15 apr 2006 in comp.lang.javascript:
Hi, I have a question...
I suspected that ...
I inserted a javascript into my index file for my webpage to password
protect. With the successful login, your get the intended page. But,
because the page that was directed from the login can be accessed by
typing in the URL (or google scans it), how do I make it so that that
page always asks for the username/password. Am I able to make a folder
containing all the pages that I want protected and that won't be
accessible by everyone on the net? I am not a programmer by any means
and I'm sorry if this doesn't make a whole lot of sense... Thank you
for your time...


Clientside javascript cannot protect you[r pages] because the user can find
or switch off the password easily.

Show us your page's url, if you do not believe this.

Pasword protection should be done with serverside code,
and if you want to use javascript, do it on an ASP platform.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Apr 15 '06 #2
Hi, thanks for your reply - I know that this is by no means secure,
what I am trying to accomplish is to avoid the page being picked up by
search engines and only be available to family and friends...

Thanks again...

Apr 15 '06 #3
al*******@yahoo.com wrote:
Hi, I have a question...

I inserted a javascript into my index file for my webpage to password
protect. With the successful login, your get the intended page. But,
because the page that was directed from the login can be accessed by
typing in the URL (or google scans it), how do I make it so that that
page always asks for the username/password. Am I able to make a folder
containing all the pages that I want protected and that won't be
accessible by everyone on the net? I am not a programmer by any means
and I'm sorry if this doesn't make a whole lot of sense... Thank you
for your time...


It's usually done by a server script, which has way better means to
protect your pages.

Can be done by JavaScript, but then the page name will be calculated.
For example, say your password will be "jh348s", then your page can be

jh348s.html

or even better

e7685412a06162558a92f7fa85311b33.htm

It will still be accessible if someone knows the URL, but someone
knowing the URL

The script dor calculating MD5 is here:

http://pajhome.org.uk/crypt/md5/
Apr 15 '06 #4
Roman Ziak wrote:
al*******@yahoo.com wrote:
Hi, I have a question...

I inserted a javascript into my index file for my webpage to password
protect. With the successful login, your get the intended page. But,
because the page that was directed from the login can be accessed by
typing in the URL (or google scans it), how do I make it so that that
page always asks for the username/password. Am I able to make a folder
containing all the pages that I want protected and that won't be
accessible by everyone on the net? I am not a programmer by any means
and I'm sorry if this doesn't make a whole lot of sense... Thank you
for your time...


It's usually done by a server script, which has way better means to
protect your pages.

Can be done by JavaScript, but then the page name will be calculated.
For example, say your password will be "jh348s", then your page can be

jh348s.html

or even better

e7685412a06162558a92f7fa85311b33.htm

It will still be accessible if someone knows the URL, but someone
knowing the URL


Sorry, did not finish the thought: someone knowing this URL is as
(im)probable as someone knowing the password.

Roman
Apr 15 '06 #5
wrote on 15 apr 2006 in comp.lang.javascript:
Hi, thanks for your reply - I know that this is by no means secure,
what I am trying to accomplish is to avoid the page being picked up by
search engines
Use

<meta name="ROBOTS" content="NOINDEX,NOFOLLOW">

or put a robots.txt in your root.

see: <http://www.robotstxt.org/>
and only be available to family and friends...


advice: do not do this your way, even your expectations will fail!
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Apr 15 '06 #6
al*******@yahoo.com wrote:
Hi, thanks for your reply - I know that this is by no means secure,
what I am trying to accomplish is to avoid the page being picked up
by search engines and only be available to family and friends...


You are looking for a Web server within a VPN.
PointedEars
Apr 16 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: netsurfer | last post by:
hi..I'm working on a project that requires files to be password protected on a UNIX based site. The people that own the web site want to be able to change the password every so often. ...
2
by: Maziar Aflatoun | last post by:
Hi, I'm trying to protect one of my subfolders from Web.config file in my root folder. Here is my directory structure / // My shopping cart /admin // Shopping cart...
7
by: Shawn | last post by:
Hi. I have a folder that contains a lot of different documents. xls, .doc, .pdf etc. Different users have access to different documents. The problem is that if a user knows the name of a...
1
by: darrel | last post by:
I have a section of our site that I'm putting behind a password. The template checks to see if a cookie was set, if not, it sends you to the login page, where you enter in the pwd, and it sets...
3
by: Mike Kingscott | last post by:
Hi there, I'm writing an app in which a punter buys some PDFs online. After purchasing said PDFs, they will be given a token (bless them Guids) to go to a download .ASPX page from which they can...
1
by: John Dalberg | last post by:
I am developing an app for a web hosting hosting company and placed in sites folders. The app will be used by the sites and accessible to webmasters using ftp. What options do I have to protect...
2
by: Adam | last post by:
I have an asp.net site for which I want to protect two different folders (for arguments sake, call them "members" and "admin"). I'm reading username and password info from a database, which is...
12
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown...
0
by: tshad | last post by:
How would I protect all my files from someone getting access to my asp,htm,gif,jpg etc. files? I can protect my .aspx files using Forms Authentication and dropping the following in my specific...
12
by: David | last post by:
Hi, I want to be able to make a class only visible within the namespace, i.e. only other classes within the namespace will have access to it. I have tried putting a protected keyword against...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.