I want to GPL some standalone web pages containing my Javascript/D3.js source code. How to use GNU licenses for your own software says that to distribute source code under the GPL, I should "include a copy of the license itself somewhere in the distribution of your program."

I could bundle up the web pages into a distribution, e.g. in a github repo, and include the license file there. However, in practice, I am actually distributing the source files individually: They're up on the web. It sounds as if should include the entire license in each of the HTML files (e.g. as a comment in the HTML), making the source file five or six times larger.

I'll of course include a copyright notice, stating that the source is distributed under the GPL, but do I really have to include the entire GPL text in the page source? Can't I just provide a URL to the GPL?

I was unable to find anything relevant to this question in the GPL FAQ.

  • Can you clarify: Are you using the javascript source in your web page, or are you actively providing a download link for that source? Commented Sep 30, 2014 at 6:37

2 Answers 2


Given you can "link" to the source code:

If you are releasing your program under the GNU AGPL, and it can interact with users over a network, the program should offer its source to those users in some way. For example, if your program is a web application, its interface could display a “Source” link that leads users to an archive of the code. The GNU AGPL is flexible enough that you can choose a method that's suitable for your specific program—see section 13 for details. source

There's no reason that you shouldn't be able to link to the GPL to avoid the download hit per load for your JS app.

include a copy of the license itself somewhere in the distribution of your program.

Just means to download and link to the GPL locally within your system; aka website, git, etc.

Where must one put the license notification?

It is sufficient to put the full license notice in the “main” file of your document. For example, with the Emacs Lisp Reference Manual, we have many files included by elisp.texi. We keep the full notification in elisp.texi, and in the other files we simply write:

@c --texinfo-- @c This is part of the GNU Emacs Lisp Reference Manual. @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1999 @c Free Software Foundation, Inc. @c See the file elisp.texi for copying conditions.


Again, this points to it being fine to place the full license notice in a file that's referenced as needed.

  • Thanks blunders. Well, putting a copy of the GPL on my site is no problem, even if it seems redundant. I suppose it's better to have the license in a page that I control, since gnu.org might reorganize their site some day.
    – Mars
    Commented Sep 30, 2014 at 3:49
  • @Mars: No problem, thanks for posting the question, and using the GPL too! Added an update to my answer that provides more proof that this not only okay, but the correct way to do this. Cheers!
    – blunders
    Commented Sep 30, 2014 at 4:00
  • The only flaw--not much of a flaw--is that if you distribute your program as a tar or zip file (etc.), or put in a git repo, it's natural to pull along the license file with the rest of the source (although one could remove the license). With a self-sufficient web page that you find on the web, it's a little more natural to simply copy the single page and leave the license behind. I guess that was what was part of what bothering me, but I'm not going to worry about it. I don't have a good solution to that "problem".
    – Mars
    Commented Sep 30, 2014 at 4:06
  • Well the link to the "full license" could just be a distribution your program as a tar or zip file which includes the full license too, right? As for just copying the code, but not the license, that's just life; meaning there is no solution.
    – blunders
    Commented Sep 30, 2014 at 4:12

FSF actually recommends to use GNU Free Documentation License as a copyleft license for textual works of practical use rather than GNU General Public License (which is mostly for code). And they do that for their own online documentation. But since both of them (GPL and FDL) have similar requirements to include the full text of license in distribution, you probably can follow GNU websites as as example.

For instance, there is a manual for GCC; you could see while the copyriht notice is indeed included in source of every page, the copy of FDL is included once as a separate chapter mentioned in TOC.

  • Thanks Dimtriy. Maybe my question wasn't clear. There is barely any text on these pages; they display animations that I have programmed. So what I'm GPLing is the Javascript source code that's contained in the HTML file. I can't include a separate license file with an HTML file when it's accessed on the web, except as another page that I link to. In that case, why not just link to the GPL text on gnu.org? Does that make sense? Or I could include the license as a "chapter" within each of the files that I put on the web, but the license contains 5X as many characters as the source code.
    – Mars
    Commented Sep 30, 2014 at 3:31
  • @Mars Probably, it was I who did not speak clearly. I was not dissuading you from using GNU GPL, just explaining why it’s not easy to find an trustful example of GPL-covered website. But I believe (@blunders do the same, as I see), that you can follow guidelines for GNU FDL instead, since it has similar requirements about providing full text of license. Commented Sep 30, 2014 at 7:39
  • @Mars As for including a link to license from every page, GNU suppose this is superfluous. According to example above, it is enough to link from the index page. As for reasons for storing license locally (i. e. on your website), consider that somebody would make a mirror of your website for offline use, then gnu.org would be unaccessible. Commented Sep 30, 2014 at 7:52
  • Wrong. The GFDL is actually not recommended for documents anymore, but it was historically. The only reason that existing documents haven't been relicensed is because of the Debian/FSF war.
    – o11c
    Commented Oct 1, 2014 at 23:31
  • @o11c No, it’s still a recommended license, check the link I gave from the word ‘recommends’ plus gnu.org/licenses/license-list.en.html#FDLOther. Commented Oct 2, 2014 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.