java

i have some java script that i would like to hide from the public but i have no idea how. please could you give me some html code that could hide it or something so that visitors could not copy it please.
ZEON101Asked:
Who is Participating?
 
lilian_kellyCommented:
If you put your code in a .js file and then include the file then when you do a view source all that will be seen is the name of the js file. But thats does not stop them trying to download the js file.

Place this in the head of the js file.

<SCRIPT SRC="myjsfile.js></SCRIPT>

0
 
ovidiucraciunCommented:
java question?
0
 
yatest5Commented:
If you place everything beween the <SCRIPT> and </SCRIPT> tags in a name.js file you can include it in your HTML by doing

<SCRIPT SRC=name.js></SCRIPT>

This will hide it from the casual browser.  Anything more secure that that is difficult.  You could try getting some obfuscation software which changes the names of things in your code to render it meaningless to the outside world.  I don't know where to find any unfortunately though.

Good luck,

Tom
0
 
yatest5Commented:
Oops, we posted that at the same time - touche Lilian.
0
 
ZEON101Author Commented:
thanx everyone
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.