Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I keep my source code secret?

Hiding source code

How do I keep my source code secret?

by  tanderso  Posted    (Edited  )
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.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top