Re: nebie - keeping javascript code away from prying eyes
- From: "Richard Cornford" <Richard@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 18 Feb 2006 18:04:01 -0000
Vladas Saulis wrote:
Dave Schwimmer wrote:
Ok. precise and to the point. Thats good. But theres
always a way though (or is there?).
Sometimes no means 'no, not ever' .
What if I have my
libraries in *.js files on the server in a location that
the user does not have permissions to (I will ofcourse
need something server side to load the files - which
defeats the purpose of client side processing, so I shot
myself in the foot already).
Does anyone know how to get around this?.
In my projects I use AJAX-like connections through IFRAME,
which loads JS from the server (generated on the fly), and
then executes it via eval(). If I instruct a browser
not to cache this loaded page (with no-cache header), it
might be possible to hide JS source.
Web browsers often treat 'instructions' not to cache a resource as an
instruction not to hang on to a copy of that resource once they have
closed down. If you look in the cache while the site is still in the
browser all the downloaded resources (irrespective of protocol or
headers) are likely to be available (and you only need to know one
browser where that is true to get around any number of browsers that may
act in a manner that is more friendly to the prospective code hider).
And that is assuming the site is not using plain HTTP and the
prospective student of the code is not just recording all the incoming
HTTP traffic to disc.
The whole 'code hiding' notion is a dead loss; the only people against
whom it is effective are the people who would have no use for what they
found (most of whom do not know enough to even look for the code). As
soon as you are trying to defeat people with even an intermediate
understanding of javascript and web technologies the client-side code is
wide open to examination.
Richard.
.
- References:
- nebie - keeping javascript code away from prying eyes
- From: Dave Schwimmer
- Re: nebie - keeping javascript code away from prying eyes
- From: Jim
- Re: nebie - keeping javascript code away from prying eyes
- From: Dave Schwimmer
- Re: nebie - keeping javascript code away from prying eyes
- From: Vladas Saulis
- nebie - keeping javascript code away from prying eyes
- Prev by Date: Re: scrollbars in IE disappearing and appearing again
- Next by Date: Re: Str Replace
- Previous by thread: Re: nebie - keeping javascript code away from prying eyes
- Next by thread: Re: nebie - keeping javascript code away from prying eyes
- Index(es):
Relevant Pages
|