Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Hiding source code

How do I keep my source code secret? by tanderso
Posted: 23 Dec 00

There is no way to hide source code from browsers; that is what they use to render your page.  Even if the browsers did not make a "view source" option, then it would be trivial to telnet to your webserver port and spoof a browser.  Until there is a standard for compiled javascript (I'm not holding my breath) it will be a plain-text interpreted language.

Now, there are tricks you can use to make it harder for people to get your source such as using external js files and setting your oncontextmenu or onclick handlers to make it harder to "view source".  However, these just add an extra step.  Anyone can access your source trivially no matter what tricks you use.

The only way to really hide your source is to turn off your webserver.

Back to Javascript FAQ Index
Back to Javascript Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close