/    Sign up×
Community /Pin to ProfileBookmark

password protection

Hi guys!
I am facing a “problem”, I am trying to “protect” a page of my site with a java script based password( the password inserted by the user is URL of the protected page), it works, but is very weak, because if the user bookmark the page he can reconnect to the page without using the password.
I am trying to solve this problem with the “window.opener.location”, but it does not work, because if the user try to reconnect using a bookmark the page display an error “‘window.opener.location is null or is not an object’
Can you help me?
Thank you for your attention

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@rhsundergroundDec 27.2004 — i HIGHLY recommend that if you really want to use a password to protect your site, use something besides javascript, such as [URL=http://www.javascriptkit.com/howto/htaccess3.shtml].htaccess[/URL]
Copy linkTweet thisAlerts:
@senshiDec 27.2004 — add a bookmark routine to put the desired URL into the bookmark info when the user tries to bookmark that page your URL to the homepage can be specified instead...
Copy linkTweet thisAlerts:
@the_bowmanauthorDec 28.2004 — [i]Originally posted by rhsunderground [/i]

[B]i HIGHLY recommend that if you really want to use a password to protect your site, use something besides javascript, such as [URL=http://www.javascriptkit.com/howto/htaccess3.shtml].htaccess[/URL] [/B][/QUOTE]

Thank you! I think that is the right way, I will try with this solution, have a nice day and a a happy new year!

the bowman
Copy linkTweet thisAlerts:
@the_bowmanauthorDec 28.2004 — [i]Originally posted by senshi [/i]

[B]add a bookmark routine to put the desired URL into the bookmark info when the user tries to bookmark that page your URL to the homepage can be specified instead... [/B][/QUOTE]


I am sorry, but I am not a JavaScript expert. What is a bookmark routine?

Can you post me an example?

Thank you very much and happy new year.

the bowman
×

Success!

Help @the_bowman spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.14,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...