Software licenses and JavaScript


I’ve been looking at software licenses and JavaScript and have to say it is a little confusing. I wondered if I could get clarification on a few things (and yes I accept it is not legal advice). From what I can tell there are:

Licenses that promote open source

Licenses that let you do just about anything

The MIT one seems to be the most straight forward and am pleased to see that most of the JQuery plugins I use use this license.

  1. Am I right in saying that GPL is a poor choice for JavaScript? It seems there is a lot of confusion over what constitutes “linking” in the context of a website. By the way, what exactly is static and dynamic linking?
  2. Does GPL mean everything you write that uses a GPL license must be open sourced under GPL whereas LGPL and MPL are geared more towards only making certain libraries/modules and derivative works open source?
  3. I use CKEditor which is triple-licensed under GPL, LGPL and MPL. The Mozilla Public License looks the most permissive. I read the FAQ on Mozilla and it seems you can modify the source “privately” (i.e. you don’t distribute it to the public) or use it as is and not have to open source it. If you do modify it and distribute it, you need to open source the library you changed and publish any changes. In the context of using CKEditor (a WYSIWYG editor) for clients’ websites would this count as private use seeing I am not distributing it? What if the editor appeared on a publicly available part of the website (i.e. not the CMS)? Is that distribution? It doesn’t matter either way as I have not changed the source. I am just curious.

It seems like a bit of a minefield out there but from what I can tell the MIT license is best if you aren’t bothered about open source. If you are go for the MPL.


I’m going to bump this…anyone?

I am not a lawyer, but my understanding is that you don’t need to worry so much about this. What exactly is static and dynamic linking in context of a web application is probably not 100% agreed - for example the Joomla project has set up the rule that in the backend code you can write your own stuff independently and it doesn’t become GPL, but if you extend the Joomla classes, your code becomes GPL. Based on this I would assume that your changes to Javascript libraries would at worst affect all javascript code in your site, but nothing else.
You are correct, MIT is very permissive, but as long as you don’t have a product, it doesn’t matter. This is largely because “distribution” is not enforced with any open source licence I know. For example I customise Joomla sites for clients. I distribute to my client. My client chooses to not distribute to anyone.
I would expect that due to the nature of javascript, which has to be downloaded to the end users computer distribution happens automatically. But licencing happens automatically as well.

So if you want to protect your changes from other people using it with javascript, open source won’t work. Open source business models are often secondary, ie. support, developer licence, tools, data, access. For example you are not allowed to stop someone distributing your GPL library, but you can charge for someone to access your download repository.

On top of that many GPL libraries (again for Joomla) charge on a per site basis. You may argue they can’t, but it doesn’t mean that people won’t simply pay it. In the end they can only refuse support for each unlicenced site, but that may be enough to get a high percentage of users paying for it (if its cheap enough)


I think the problem is the linking issue hasn’t been tested in court. For me, MIT is perfect as there are now restrictions but my name will always appear in any derivative works. For me that is perfect when I release a script. I don’t want restrictions, just due credit.

From what I’ve read it can be argued that if you use a GPL JS library (unchanged) when you send it to the user’s browser, you are distributing it as is and then the client is linking to it. If you modified the script that I have no qualms about publishing the JS under GPL so long as it’s changed code only and not all of your work that just links to it. The thing is LGPL and MPL already support this which is why I simply do not understand why JavaScirpt libraries are released under GPL. Maybe it’s just ignorance.