Browsed by
Category: AJAX

Hiding JavaScript? Maybe….

Hiding JavaScript? Maybe….

As anyone around me knows (because I will not shut up about it) I have been working on a new project. Said project relies very heavily on JavaScript and revolves around an unusual use for a web browser that I do not want to advertise just yet. Because of this I have been looking for ways to hide my HTML, CSS, and JavaScript from the client. The short answer I discovered? You can not.

Or can you? Of course if any software is going to run code it will have to have a copy in one form or another. With a scripting language the code is presumably viewable to anyone, right? With JavaScript it is viewable in the View Source option of the users browser which makes everyone from a curious hacker to your grandmother your worse enemy (I love grandma unless she steals my stuff). You can perform obfuscation on your code but that really does not fix the problem; Anyone with half a brain could decode anything the browser can decode because all the tools they would need are already in front of them. What to do, what to do?

Although it does not solve the problem completely I am considering a new project. A project that might hide virtually everything but still allow the browser to render properly. What if this method was inherently cross-platform and completely transparent to the client? What if this method not only offered a developer a lot more security but also provided an API that made web applications stateful with any unmodified, off-the-shelf web server and a lot more efficient on bandwidth?

I may soon start running experiments to test feasibility but I do not foresee any reason my idea would not work. Perhaps this could even be a marketable product…