ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Particulalry with HTML5, is there a way to hide the javascript? When I'm not working on opensource, I would like to be able to protect the javascript from prying and copying eyes?
Hiding javascript as far as viewing the source of the webpage? Can't really fully do that, but to help, you could keep all the javascript in a src file and load it as such.
Hiding javascript as far as viewing the source of the webpage? Can't really fully do that, but to help, you could keep all the javascript in a src file and load it as such.
Wouldn't one find that it still gets pulled into the browser?
With, what seems the march towards HTML5 and increasingly complex offerings written in JS, I guess protection will be crucial?
As far as I am aware, it's impossible to "hide" javascript, only obfuscate it (as dugan said). The browser needs to know what the code is to run it, and so people will always be able to see it somehow
Snark, thanks. I thought to myself about that one, and there really isn't any way to hide code from a browser. If it can be done, some sort of government agency knows how to do it.
Yes that is true, but we are talking about hiding javascript. Of course you can use flash or java to do the same thing, but I think the OP wants to operate in just javascript. Well, unless he is willing to jump that hurdle and do it that way... :P
Sure there are. Java applets, Flash, Silverlight, and other plugins.
True, but in principle the same idea applies. You would have to decompile it (and brief google searches suggested decompilers exist for all the formats you mentioned) but the fact remains that all the code necessary to run the thing is there. It just depends on how determined the person is to get at the code - but, yes, for most practical purposes you are correct
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.