By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,385 Members | 1,767 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,385 IT Pros & Developers. It's quick & easy.

unreadable js code

P: n/a
Hi all,

I'd like to find a way to make a part of my code unreadable from users when
they look at the source of my web page.
It is possible ?
I thought of using document.write(a_crypted_unreadable_string)... is it a
good idea ?
In fact, the code I want to make unreadable should generate html.

Thanks in advance,
--
alex
Oct 11 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
alex wrote:
Hi all,

I'd like to find a way to make a part of my code unreadable from users when
they look at the source of my web page.
It is possible ?
I thought of using document.write(a_crypted_unreadable_string)... is it a
good idea ?
In fact, the code I want to make unreadable should generate html.

Thanks in advance,
--
alex

One's desire to hide the source code is inversly proportional to its
quality.

--
Vladdy
http://www.klproductions.com
Oct 11 '05 #2

P: n/a
Vladdy wrote on 11 okt 2005 in comp.lang.javascript:
alex wrote:
I'd like to find a way to make a part of my code unreadable from
users when they look at the source of my web page.
One's desire to hide the source code is inversly proportional to its
quality.


So true,
but a simple advice could be given,
though highly ineffective but for restraining the most casual visitor.

Use an external jscript:
<script type='text/javascript' src='mySillySecret.js'></script>

This answers the OQ perfectly,
the page root wouldn't show the code at all. ;-)
In fact, the code I want to make unreadable should generate html.


It could.
However that html could be read pasting and using the IE command line:

javascript:alert(document.documentElement.outerHTM L)
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 11 '05 #3

P: n/a
thank you !
Oct 11 '05 #4

P: n/a
> I'd like to find a way to make a part of my code unreadable from users when
they look at the source of my web page.
It is possible ?
I thought of using document.write(a_crypted_unreadable_string)... is it a
good idea ?
In fact, the code I want to make unreadable should generate html.


Understand that nothing can be hidden from the person who is capable
of understanding and exploiting your code. a_crypted_unreadable_string
is the really bad idea.

The only thing that works is to unplug your server. Every other
technique to hide your code will fail. There is no point in doing
things that fail. Focus instead on things that succeed.

http://www.crockford.com/javascript/jsmin.html
Oct 11 '05 #5

P: n/a
alex wrote on 11 okt 2005 in comp.lang.javascript:
thank you !


Thank who?

This is usenet, do please quote to establish what and who you are
responding on or to.

Many are reading and the connection to the older posting is not available
to everyone.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 11 '05 #6

P: n/a
"Evertjan." <ex**************@interxnl.net> a écrit dans le message de news:
Xn********************@194.109.133.242...
alex wrote on 11 okt 2005 in comp.lang.javascript:
thank you !


Thank who?

This is usenet, do please quote to establish what and who you are
responding on or to.

Many are reading and the connection to the older posting is not available
to everyone.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)


I meant thank you Evertjan.

--
alex
Oct 11 '05 #7

P: n/a
On 11 okt 2005, you wrote in comp.lang.javascript:
"Evertjan." <ex**************@interxnl.net> a écrit dans le message de
alex wrote on 11 okt 2005 in comp.lang.javascript:
> thank you !
Thank who?

[..]
I meant thank you Evertjan.


Roger, roger ...
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 11 '05 #8

P: n/a
alex <al**@nospam.org> wrote in message news:43**********************@news.free.fr...
Hi all,

I'd like to find a way to make a part of my code unreadable from users when
they look at the source of my web page.
It is possible ?


Of course it's possible; I come across it all the time. Just copy the layout of
the poorer code examples posted on here. In fact the more of a beginner
you are, the easier you should find it.
--
S.C.
Oct 11 '05 #9

P: n/a
"Stephen Chalmers" <ig******@lycos.co.uk> a écrit dans le message de news:
43**********@mk-nntp-2.news.uk.tiscali.com...
alex <al**@nospam.org> wrote in message news:43**********************@news.free.fr...
Hi all,

I'd like to find a way to make a part of my code unreadable from users when they look at the source of my web page.
It is possible ?


Of course it's possible; I come across it all the time. Just copy the

layout of the poorer code examples posted on here. In fact the more of a beginner
you are, the easier you should find it.
--
S.C.

well... I didn't really get your piece of advice.
could you precise a little more ?

--
alex
Oct 12 '05 #10

P: n/a
alex <al**@nospam.org> wrote in message news:43***********************@news.free.fr...
"Stephen Chalmers" <ig******@lycos.co.uk> a écrit dans le message de news:
43**********@mk-nntp-2.news.uk.tiscali.com...
alex <al**@nospam.org> wrote in message

news:43**********************@news.free.fr...
Hi all,

I'd like to find a way to make a part of my code unreadable from users when they look at the source of my web page.
It is possible ?


Of course it's possible; I come across it all the time. Just copy the

layout of
the poorer code examples posted on here. In fact the more of a beginner
you are, the easier you should find it.
--
S.C.

well... I didn't really get your piece of advice.
could you precise a little more ?


So much of the code that one encounters is soo poorly laid-out that it would be
classed as unreadable, which is what you requested.

--
S.C.
Oct 12 '05 #11

P: n/a
"Stephen Chalmers" <ig******@lycos.co.uk> a écrit dans le message de news:
43**********@mk-nntp-2.news.uk.tiscali.com...
alex <al**@nospam.org> wrote in message news:43***********************@news.free.fr...
"Stephen Chalmers" <ig******@lycos.co.uk> a écrit dans le message de news: 43**********@mk-nntp-2.news.uk.tiscali.com...
alex <al**@nospam.org> wrote in message

news:43**********************@news.free.fr...
> Hi all,
>
> I'd like to find a way to make a part of my code unreadable from users
when
> they look at the source of my web page.
> It is possible ?

Of course it's possible; I come across it all the time. Just copy the

layout of
the poorer code examples posted on here. In fact the more of a

beginner you are, the easier you should find it.
--
S.C.

well... I didn't really get your piece of advice.
could you precise a little more ?


So much of the code that one encounters is soo poorly laid-out that it

would be classed as unreadable, which is what you requested.

--
S.C.


Ok, I'll try my best to produce the worst js code ever ;-)
Oct 12 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.