0

I have a webpage which has an external javascript file attached to it . Now in firebug , I can see all the js code and so can anyone else , is there a way so that the code can be hidden but it would still work?

Aditya Shukla
  • 13,595
  • 12
  • 38
  • 36
  • 2
    Almost all JavaScript code on the internet is public. If you want to hide the code, I suggest you to move it to the server-side. – Šime Vidas Dec 25 '10 at 03:15
  • 3
    No, you cannot. This has been asked to death [before](http://stackoverflow.com/questions/2222355/how-to-hide-javascript-code) and it's still not possible! – deceze Dec 25 '10 at 03:19

2 Answers2

5

No. There is no way to do that. That's not how the internet works. You cannot do that. Stop worrying about it. You cannot send a file and expect the file not to be sent.

Incognito
  • 20,537
  • 15
  • 80
  • 120
1

The #1 law of software licensing: You don't control your software once you allow it to be installed run on a computer you don't control.

(blatently stolen from my own answer here)

Community
  • 1
  • 1
Ben Voigt
  • 277,958
  • 43
  • 419
  • 720