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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.