How can I protect my javascript code from being stolen?
-
I've written some customizable interactive activity templates in javascript that work on tablets and I want to sell to publishers. How do I prevent anyone from stealing and re-using the code? There's nothing specifically unique or patentable in it. I've just simply spent a lot of hours customizing something that would be very useful to educational publishers fulfilling a very specific need. Most publishers don't want to spend the money to do it on their own. This is just the kind of thing they would buy. Thing is, i've done it using jquery / JS. Do I have any other options other than obfuscation?
-
Answer:
Not really, not if it's client-side JS. Even if you obfuscate it, people could fairly easily replicate it simply by observing what it does. The usual solution is to offer great docs, support and maintenance so that it becomes challenging in the long run for the pirates to use it. Besides, medium to large companies always need these three resources and don't steal code in this price class. Additionally, you could add a mechanism that makes it easier for you to detect sites that are using your code and see if they have a license or not. Then it's just a matter or involving a lawyer. There are http://stackoverflow.com/questions/2862470/javascript-library-to-obfuscate-or-not-to-obfuscate-that-is-the-question http://stackoverflow.com/questions/194397/how-can-i-obfuscate-javascript on Stack Overflow on the limitations of obfuscation.
postergeist at Ask.Metafilter.Com Visit the source
Other answers
Forgot: it's pretty common to offer tiered support where you have small (very basic stuff, included in the price of the solution), medium and large packages where customers are offered increasingly generous support solutions. I've seen people pull this of with even basic wordpress plugins so it should work for you.
Foci for Analysis
Do I have any other options other than obfuscation? Lawyers. (Doesn't matter if your software is patentable; you can still retain copyright.)
ook
Lawyers.... nah.
postergeist
You cannot effectively protect this content by technical means. Because JavaScript is not a compiled language, the source can be grabbed and used by anyone using the code. You can use something lie http://dean.edwards.name/packer/ to do obfuscation, but in the end, your customer has the working code. You can add checks in the code if you like, maybe to a remote server of yours to monitor usage, but then you have additional latency as your code needs to do extra network traffic to determine if the usage is licensed. So the challenge to you is to do this at a cultural and human level. Make it absolutely clear you own copyright, and you are selling licenses for a particular purpose, and beyond that more services should be paid for. And you can use lawyers, you know, like the music business and movie business.
artlung
Lawyers.... nah. Doesn't have to be, like, scary lawyers. A license for your code and a copyright notice wouldn't cost that much to get written up, and is going to be a lot more protection than code obfuscation. (I work in almost exactly the same industry niche. I agree with Foci for Analysis that the publishers you're hoping to work with are unlikely to try to rip you off, provided you've made at least a token effort at legally preventing them from doing so. And most will strongly prefer unobfuscated code they can tweak if need be.)
ook
Most publishers don't want to spend the money to do it on their own. This is just the kind of thing they would buy. Why do you need more than this? It's been the basis of selling products and services at least since the beginning of the Industrial Age. How are you planning on selling the code? As for stealing, I'm not aware of any tablets that have a "view source" option, or Firebug, so one way of obfuscating is to host your code on a site that enforces user agent-based page rendering. You know, so tablets only (more or less) see your tablet code.
rhizome
[O]ne way of obfuscating is to host your code on a site that enforces user agent-based page rendering. You know, so tablets only (more or less) see your tablet code. Except it's trivial to change the User-Agent sent by your browser to the servers it hits, so anyone can pretend to be using a tablet when they're really on their regular computer. Yoink!
letourneau
Which is why I called it merely, "obfuscating."
rhizome
Related Q & A:
- How can I debug my php code?Best solution by Stack Overflow
- How Can I add Latitude, Longitude dynamically in Javascript?Best solution by Stack Overflow
- How can I call Android JavaScript functions in WebView?Best solution by Stack Overflow
- How can I add a HTML code to My Yahoo homepage?Best solution by Yahoo! Answers
- How can I password protect my printer?Best solution by Super User
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.