GPL for JS libraries (Was: Re: Redefining GPL?)
Philippe Verdy
verdy_p at wanadoo.fr
Fri Dec 1 15:35:44 UTC 2006
From: "Michael Bernstein" <webmaven at cox.net>
> 2. Then, you put the text of the GPL as-is inside a license.js
> file (it is just 17k), and refer to it from the web-page just
> like any other .js file. Even though the license is not valid
> JavaScript, the browser should download it, and the file will be
> cached thereafter.
Why can't it be valid Javascript? you just need to embed the GPL plain-text file within a javascript comment, and then you're done. The GPL says that it must be provided verbatim, but it does not expose the way it can be encapsulated. So a javascript file which includes only comments will not warn the browser (and will not cause it to stop running other javascripts due to the detected invalid syntax).
The javascript file in the browser cache remains perfectly readable, and effectively contains a verbatim copy of the GPL text. So all you need to do in javascript.js is to take the GPL text source, insert a line at top which contains "/*", and another at end which contains "*/".
Note that the GPL also requires that you provide a copyright notive in your GPL'ed code distribution (a copyright notice within your javascript library will be OK), and that you provide a written offer to get the complete sources (which could be done by insertng this offer within your licence.js" pseudo-script).
The syntaxic or technical form with which the GPL licence verbatim copy is encoded does not matter. What is required is to include the text exactly when you republish it, without modifying it, unless you are the author of the GPL'ed source (in which case you may add clauses if they conform to the GPL requirements, otherwise the non-conforming clauses require that you rename the licence, and the exact form does not matter).
More information about the License-discuss
mailing list