thecard Posted December 13, 2008 Share Posted December 13, 2008 Whats the best way to encrypt entire javascript scripts? Turn it into gobbledo gook Quote Link to comment Share on other sites More sharing options...
Psycho Posted December 13, 2008 Share Posted December 13, 2008 For what purpose? To keep someone else from stealing your code? No matter what you do, if the code is readable to the browser then it can be reversed by anyone willing to take a little time to do so. So, what's the point? Besides, haven't you ever benefitted by reusing other's code whether it is using a free script or examing the code on a page to figure out how they did something? But, since you ask,,, There are several ways to obfuscate your code. How you do it may depend on the purpose and the use. As long as you keep the original source code in a readable state you can use a free resource such as this: http://www.javascriptobfuscator.com/Default.aspx Or you can get an application that maintains the original source and generates the obfuscated code when you need it, such as this: http://www.javascript-source.com/javascript-obfuscator.html But, I would not guarantee that any of the obfuscation methods would not make the code unreadable by some browsers. Again, I think it is waste of time, but it's your time. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.