| You can't. There is no way to produce an HTML document that can be rendered in a browser but whose source cannot be examined in its entirety, scripts included. And since web browsers have functions like "View Source" and "Save As HTML," copying is a cut-and-paste operation.
Putting a copyright notice at the head of your code affords some legal protection.
Microsoft has introduced a technique called script encoding( http://www.microsoft.com/mind/0899/scriptengine/scriptengine.asp) that garbles HTML, ASP, VBS, and JScript source code so that it is unreadable by a casual user. (The lightweight encryption used won't stop determined hackers.) The technique requires Microsoft's version 5.0 Script Engine; it won't execute in Netscape Navigator or earlier MSIE versions. |