Connecting Tech Pros Worldwide Forums | Help | Site Map

FAQ Topic - How can I protect a webpage in javascript?

FAQ server
Guest
 
Posts: n/a
#1: Aug 17 '06
-----------------------------------------------------------------------
FAQ Topic - How can I protect a webpage in javascript?
-----------------------------------------------------------------------

In practice you can't. While you could create a suitable
encryption system with a password in the page, the level of
support you need to do this means it's always simpler to do it
server-side. Anything that "protects" a page other
than the current one is definitely flawed.


===
Postings such as this are automatically sent once a day. Their
goal is to answer repeated questions, and to offer the content to
the community for continuous evaluation/improvement. The complete
comp.lang.javascript FAQ is at http://www.jibbering.com/faq/.
The FAQ workers are a group of volunteers.


Randy Webb
Guest
 
Posts: n/a
#2: Aug 18 '06

re: FAQ Topic - How can I protect a webpage in javascript?


FAQ server said the following on 8/17/2006 7:00 PM:
Quote:
-----------------------------------------------------------------------
FAQ Topic - How can I protect a webpage in javascript?
-----------------------------------------------------------------------
This would be nicer if it included the section that it comes from.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Robert
Guest
 
Posts: n/a
#3: Aug 18 '06

re: FAQ Topic - How can I protect a webpage in javascript?


FAQ server wrote:
Quote:
-----------------------------------------------------------------------
FAQ Topic - How can I protect a webpage in javascript?
-----------------------------------------------------------------------
>
In practice you can't. While you could create a suitable
encryption system with a password in the page, the level of
support you need to do this means it's always simpler to do it
server-side. Anything that "protects" a page other
than the current one is definitely flawed.
>
Looking at the topic I thought it was about protecting content. Disable
right-mouse click and other annoying and useless measures.
But this seems to be about authentication.
Bart Van der Donck
Guest
 
Posts: n/a
#4: Aug 18 '06

re: FAQ Topic - How can I protect a webpage in javascript?


Randy Webb wrote:
Quote:
FAQ server said the following on 8/17/2006 7:00 PM:
Quote:
----------------------------------------------------------------
FAQ Topic - How can I protect a webpage in javascript?
----------------------------------------------------------------
>
This would be nicer if it included the section that it comes from.
Personally I think the mentionning of the section has more benefits
than disadvantages. Open for discussion, naturally. I've changed the
Perl file accordingly; it will now say

FAQ 4.5. - How can I protect a webpage in javascript?

in Subject and Body.

--
Bart

Randy Webb
Guest
 
Posts: n/a
#5: Aug 18 '06

re: FAQ Topic - How can I protect a webpage in javascript?


Bart Van der Donck said the following on 8/18/2006 4:35 AM:
Quote:
Randy Webb wrote:
>
Quote:
>FAQ server said the following on 8/17/2006 7:00 PM:
Quote:
>>----------------------------------------------------------------
>>FAQ Topic - How can I protect a webpage in javascript?
>>----------------------------------------------------------------
>This would be nicer if it included the section that it comes from.
>
Personally I think the mentionning of the section has more benefits
than disadvantages. Open for discussion, naturally. I've changed the
Perl file accordingly; it will now say
>
FAQ 4.5. - How can I protect a webpage in javascript?
>
in Subject and Body.
>
What is coming about of posting the FAQ as it was being done before with
the Monday, Wednesday and Friday editions?

And, now might be the best time to try to go to a word hash instead of
the numbering system where it could be migrated away from the numbers.
Instead of
http://jibbering.com/faq/#FAQ4_1
you could get a URL that looked like this:

http://jibbering.com/faq/#protectCode

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Bart Van der Donck
Guest
 
Posts: n/a
#6: Aug 18 '06

re: FAQ Topic - How can I protect a webpage in javascript?


Randy Webb wrote:
Quote:
[...]
What is coming about of posting the FAQ as it was being done before with
the Monday, Wednesday and Friday editions?
At this moment the bot posts 1 entry a day, that's all. When there are
no more entries, it will start over again. Maybe the Mon/Wed/Fri
editions could be posted just as they were before ? I mean, I don't see
a reason why both couldn't exist together. Or, alternatively, a second
bot could be cloned from the current one to automate this task. I'm
open for any comments...
Quote:
And, now might be the best time to try to go to a word hash instead of
the numbering system where it could be migrated away from the numbers.
Instead of
http://jibbering.com/faq/#FAQ4_1
you could get a URL that looked like this:
http://jibbering.com/faq/#protectCode
Yes, that would be possible - stands apart from what I'm doing. I just
need the XML in the defined structure.

--
Bart

Michael Winter
Guest
 
Posts: n/a
#7: Aug 18 '06

re: FAQ Topic - How can I protect a webpage in javascript?


On 18/08/2006 14:29, Randy Webb wrote:

[snip]
Quote:
And, now might be the best time to try to go to a word hash instead of
the numbering system where it could be migrated away from the numbers.
[snip]

I raised that point earlier this month[1], but it seemed to go unnoticed.

Mike


[1] FAQ fragment identifiers (was: Re: FAQ - Why was my post not
answered?)

Date: Sat, 05 Aug 2006 02:49:23 GMT
Message-ID: TGTAg.111863$wl.107210@text.news.blueyonder.co.uk

http://groups.google.co.uk/group/com...9d184c96a253dc

Mike
Randy Webb
Guest
 
Posts: n/a
#8: Aug 19 '06

re: FAQ Topic - How can I protect a webpage in javascript?


Michael Winter said the following on 8/18/2006 11:21 AM:
Quote:
On 18/08/2006 14:29, Randy Webb wrote:
>
[snip]
>
Quote:
>And, now might be the best time to try to go to a word hash instead of
>the numbering system where it could be migrated away from the numbers.
>
[snip]
>
I raised that point earlier this month[1], but it seemed to go unnoticed.
I missed that somehow.

<quote>
Whilst I acknowledge that to simply discard the existing destination
anchors would render archived links invalid, the current consensus (at
least among the vocal posters) seems quite in favour of expanding the
FAQ.
</quote>

The issue with archived links is an issue but it wouldn't be that hard
(or shouldn't be) to have a script - client or server - that can read
the hash and if it is the old numbering system then redirect it to the
new hash along with a note on the page that the link used was outdated
and any bookmarks should be updated.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Michael Winter
Guest
 
Posts: n/a
#9: Aug 19 '06

re: FAQ Topic - How can I protect a webpage in javascript?


On 19/08/2006 14:58, Randy Webb wrote:

[snip]
Quote:
<quote>
Whilst I acknowledge that to simply discard the existing destination
anchors would render archived links invalid, the current consensus
(at least among the vocal posters) seems quite in favour of expanding
the FAQ.
</quote>
>
The issue with archived links is an issue but it wouldn't be that
hard (or shouldn't be) to have a script - client or server - that can
read the hash ...
Unfortunately, it would have to be client-side, if anything, as the
server will never receive the fragment identifier: the query string is
the last component that may be included in a request URI (even though
fragment identifiers can be used with HTTP redirection[1]).

[snip]

Mike


[1] HTTP/1.1 Errata, Fragments allowed in Location
<http://purl.org/NET/http-errata#location-fragments>
Closed Thread