Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you enforce software license in javascript? [closed]

I was looking at a javascript framework that looks pretty cool. I like the demos, when I looked at the page source and the attached .js file, I noticed the file has this "testing and evaluation purposes only, protected by copyright, this software is not free and is licensed to you for testing only"

but right under that, the entire code is there (because it is javascript). I could see if you had a compiled project and someone would have to break into a system unauthorized to get the source code, but how would you even begin to enforce a plain text language like this?

After removing their comments, find+replace renaming of the variables, re-arranging the functions, it would be impossible to even know if someone was using it with a web spider. Thats a 5 second way to lose business.

I am genuinely curious because this product seems to be their entire business plan, but all their trade secrets are available in plain within the demo. The country does not provide for adequate remedies for this sort of thing so the burden is on the creator to protect it (I mean if that is their business plan after all)

Do you have any insight into this? Solutions I completely overlooked? I am little perplexed on why someone would devote so much effort into something that they don't intend to be free, but are giving it away for free.

like image 776
CQM Avatar asked May 23 '11 15:05

CQM


People also ask

Do you need a license for JavaScript?

Using web labels presumes that the corresponding JavaScript source files carry license notices that properly release them under a free license. The compiled code isn't free unless its source code is, and indicating the license is essential for proper release of free source code.

What is granted to the user when paying for a software license?

A typical software license grants the licensee, typically an end-user, permission to use one or more copies of software in ways where such a use would otherwise potentially constitute copyright infringement of the software owner's exclusive rights under copyright.

Which license type allows installation of software without restriction?

Public domain. However, copyright does not apply to works in the public domain—anyone can modify and use such software without any restrictions.


2 Answers

There is no way to "encrypt" JavaScript code other than obfuscating it so yes, it's true there is no way to reliably copy-protect a commercial JavaScript product.

They are still worth offering because

  • Most corporate customers in western countries will not dare risk steal software due to the risk of getting caught and sued for vast amounts of money - if not through the code, then maybe through a disgruntled intern blowing the whistle

  • Different from pirated office software, the theft is publicly just as visible and accessible as the original piece of JavaScript - you never know what techniques may exist (or come up) to find stolen JavaScript code using an algorithmic approach.

  • The real loss of business is probably not as heavy as one might think: People cheap enough to steal a JavaScript widget would simply fall back to a free one if that one wouldn't be available to steal. Commercial JavaScript widgets usually don't offer any unique functionality - popular things tend to get cloned quickly - their selling point is usually that they do what dozens of Open Source solutions do too, but extremely well, fast, cleanly, and well-documented.

like image 61
Pekka Avatar answered Oct 03 '22 16:10

Pekka


There's always obfustication tools: http://www.javascriptobfuscator.com/default.aspx

This so question throughly hashes out (pun intended) the pros AND cons of obfustication practices

like image 23
Michael Jasper Avatar answered Oct 03 '22 17:10

Michael Jasper