AE117 Posted May 28, 2010 Share Posted May 28, 2010 I have never encrypted JavaScript before but I would like to start, I think its a good Idea. I'v been searching the internet to figure out how an encryption script works and I cant seem to get any of them to work. Can someone help me out with the process. 1 - I take my script and use there decodes and then put that encoded sscript into my file. Then my javascript in that file doesnt work anymore. Do I have to include a path to a decoder or whats going on?? Quote Link to comment Share on other sites More sharing options...
Mchl Posted May 28, 2010 Share Posted May 28, 2010 Why would it be a good idea? Quote Link to comment Share on other sites More sharing options...
AE117 Posted May 28, 2010 Author Share Posted May 28, 2010 I think its a good idea... On my page I access the javascript file for the page to use <script src="" you know the rest. if you follow that url you can see the javascript file and the way it is written. Wouldnt it be better to have it encrypted so users can't see whats there? Quote Link to comment Share on other sites More sharing options...
Mchl Posted May 28, 2010 Share Posted May 28, 2010 No. If they really want to see what's there, they'll be able to decrypt it anyway. It's just obfuscation that will mean nothing to those not interested in your scripts, and will not stop those who are. Just minify jour JavaScript and it will be obfuscated enough. Quote Link to comment Share on other sites More sharing options...
AE117 Posted May 28, 2010 Author Share Posted May 28, 2010 Thats true...it would create more load on my server anyway. Thanks for the advice. Quote Link to comment Share on other sites More sharing options...
Mchl Posted May 28, 2010 Share Posted May 28, 2010 JavaScript is executed in the client's browser, so that's hardly putting any stress on your server. Quote Link to comment Share on other sites More sharing options...
AE117 Posted May 28, 2010 Author Share Posted May 28, 2010 JavaScript is executed in the client's browser, so that's hardly putting any stress on your server. But the decryption process would, unless your using something like unescape, which because even more pointless. Quote Link to comment Share on other sites More sharing options...
Mchl Posted May 28, 2010 Share Posted May 28, 2010 If you were planning on on-the-fly encryption then yes, but JavaScript is mostly static. 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.