-1

I have a piece of Javascript code that changes some values in my HTML. However, for security reasons it would be much better that the end user could not read my code. I know there are ways to obfuscate it, but they can all get cracked with more or less effort. What I would need is some way of executing code on the client's side, just as Javascript does, but by no means visible in the user's machine, like PHP or Perl. Is it possible?

Variax
  • 1,057
  • 2
  • 11
  • 16
  • See the simlar post [http://stackoverflow.com/questions/1628799/hide-javascript-jquery-scripts-from-html-page][1] [1]: http://stackoverflow.com/questions/1628799/hide-javascript-jquery-scripts-from-html-page – sreejithsdev Dec 26 '12 at 09:17
  • @Variax just remove this silly idea from your head. It's not possible under any circumstances. *All* methods of obfuscation eventually fall. – David-SkyMesh Dec 26 '12 at 09:20
  • @sreejithsdev this (and any other method of obfuscation) can be unravelled to view what code executes on the client-side. – David-SkyMesh Dec 26 '12 at 09:22
  • we can't hide Javascript code,because code is interpreted on the browser.But we can obfuscate/minify code using third party tools. – sreejithsdev Dec 26 '12 at 09:28

2 Answers2

0

No. If it needs to run on the client, it needs to be visible to the client. You can only obfuscate (maybe Flash or a Java applet is hard enough to crack for you) or go server-side.

Thilo
  • 257,207
  • 101
  • 511
  • 656
0

we can't hide Javascript code,because code is interpreted on the browser.But we can obfuscate/minify code using third party tools.See the simlar posts here

Community
  • 1
  • 1
sreejithsdev
  • 1,202
  • 12
  • 26