Jump to content

Whats the best way to encrypt entire javascript scripts?


thecard

Recommended Posts

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.