<!--#include virtual="/server/header.html" --> <!-- Parent-Version:1.771.97 --> <!-- This page is derived from /server/standards/boilerplate.html --> <title>JavaScript License Web Labels: Background andrationaleRationale - GNU Project - Free Software Foundation</title> <!--#include virtual="/licenses/po/javascript-labels-rationale.translist" --> <!--#include virtual="/server/banner.html" --> <div class="article reduced-width"> <h2>JavaScript License Web Labels: Background andrationale</h2> <h3>Introduction</h3>Rationale</h2> <div class="thin"></div> <p>Users browsing theWebweb nowadays typically run huge amounts of proprietary software on their computers, often unknowingly. Free software is succeeding on the desktop partly because of the copyleft protection guaranteeing users be told up front when a particular program is free for them to use, study, share, and modify. On the Web, browsers download and run JavaScript without ever informing users of the program's license or theirfreedoms — orfreedoms—or how other programs deny users' freedoms.</p> <p>To address this problem, we developed the <ahref="/software/librejs"> LibreJS program </a>href="/software/librejs">LibreJS program</a> which recognizes nontrivial JavaScript code and checks its license. Its functioning depends on specifying licenses in a way that a program which lacks human intelligence can reliably recognize. In addition, all GNU software licenses require distributors to state the license with the software, so recipients know their rights, and to say where to find the source code.</p> <p> The simple way to specify the license is with a <a href="/philosophy/javascript-trap.html"> stylized comment in the JavaScript code</a>. However, that can be inconvenient for minified library files, so we have developed another way to state their licenses: <a href="/licenses/javascript-labels.html"> JavaScript web labels</a>.</p> <h3>Rationale</h3> <p>Conditions in free software licenses to include a copy of the license terms and access to source code are almost always easy to follow when software is distributed through the Web or other Internet channels. However, distributing JavaScript embedded in Web sites is complicated by a couple of unique factors: visitors usually receive the software without expressly requesting it, and webmasters can only serve a single file of JavaScript code (so they can't, for example, send an archive file that includes other resources required by the license).</p> <p>These issues combined leave webmasters with few obvious ways to provide additional material required by free software licenses. The simplest solution would be to serve only JavaScript in source code form, with a full copy of the license in its comments. That can be acceptable on smaller sites, but when JavaScript begins to represent a lot of repeat traffic, webmasters are understandably reluctant to serve so much data. Our method gives them a clear place to serve additional license resources—and visitors a clear place to look for it—by addressing both of these points. First, it makes the software distribution visible by offering “JavaScript license information” through a link. The linked page gives webmasters a space where they can publish those resources that's appropriately prominent but not confusing to visitors.</p> <h3>Machine readability</h3> <p>In order to make it easier for people to reject nonfree JavaScript in their browsers, our method is specific enough for a plug-in or other software to find the site's table of JavaScript license information, confirm that all of the JavaScript is under a known free license, download the source code, and confirm that it corresponds to the optimized JavaScript that's being served from the site. This way, visitors can quickly and conveniently check whether or not the JavaScript is free, and decide accordingly whether or not they want to run it. <a href="/software/librejs/">LibreJS</a> is a plug-in for Mozilla-based browsers that helps users avoid running nonfree JavaScript, and it will implement these checks to enhance its capabilities.</p> <p>We considered using another format like RDF as the basis for our system, in order to simplify this job for programmers by giving them more detailed information in an easily parsed format. However, our goal was to make this information accessible to human readers first, and machines second. Using well-structured HTML provided the best match with those priorities.</p> <h3>Next steps</h3> <p>We are not saying that webmasters that host free software JavaScript must follow this specific method to comply with the licenses. Every free software license clearly lays out its own conditions, and any webmaster who wants to use a different method that meets those conditions is welcome to do so. However, this method has the benefit of making full license information readily accessible to visitors—an issue that's been a struggle to address to date—without compromising webmasters' ability to serve JavaScript the way they feel is best.</p> <p>We are very interested to hear feedback and suggestions about other ways we might accomplish the same goals, while making the system more useful for webmasters, site visitors, or developers working on license-checking software. If we get enough suggestions to publish a new method that's noticeably improved over this one, we'll do so. (That's why this method uses such a verbose identifier for the license information table: to allow software to distinguish this method from others we might craft in the future.) If this is an issue that you're interested in, please <a href="https://lists.gnu.org/mailman/listinfo/bug-librejs">subscribe to the LibreJS mailing list</a>, and write there with your comments and suggestions. We look forward to hearing from you.</p> </div> </div><!-- for id="content", starts in the include above --> <!--#include virtual="/server/footer.html" --> <divid="footer">id="footer" role="contentinfo"> <div class="unprintable"> <p>Please send general FSF & GNU inquiries to <a href="mailto:gnu@gnu.org"><gnu@gnu.org></a>. There are also <a href="/contact/">other ways to contact</a> the FSF. Broken links and other corrections or suggestions can be sent to <a href="mailto:webmasters@gnu.org"><webmasters@gnu.org></a>.</p> <p><!-- TRANSLATORS: Ignore the original text in this paragraph, replace it with the translation of these two: We work hard and do our best to provide accurate, good quality translations. However, we are not exempt from imperfection. Please send your comments and general suggestions in this regard to <a href="mailto:web-translators@gnu.org"> <web-translators@gnu.org></a>.</p> <p>For information on coordinating andsubmittingcontributing translations of our web pages, see <a href="/server/standards/README.translations.html">Translations README</a>. --> Please see the <a href="/server/standards/README.translations.html">Translations README</a> for information on coordinating andsubmittingcontributing translations of this article.</p> </div> <!-- Regarding copyright, in general, standalone pages (as opposed to files generated as part of manuals) on the GNU web server should be under CC BY-ND3.0 US.4.0. Please do NOT change or remove this without talking with the webmasters or licensing team first. Please make sure the copyright date is consistent with the document. For web pages, it is ok to list just the latest year the document was modified, or published. If you wish to list earlier years, that is ok too. Either "2001, 2002, 2003" or "2001-2003" are ok for specifying years, as long as each year in the range is in fact a copyrightable year, i.e., a year in which the document was published (including being publicly visible on the web or in a revision control system). There is more detail about copyright years in the GNU Maintainers Information document, www.gnu.org/prep/maintain. --> <p>Copyright ©20142012, 2022 Free Software Foundation, Inc.</p> <p>This page is licensed under a <a rel="license"href="http://creativecommons.org/licenses/by-nd/3.0/us/">Creativehref="http://creativecommons.org/licenses/by-nd/4.0/">Creative CommonsAttribution-NoDerivs 3.0 United StatesAttribution-NoDerivatives 4.0 International License</a>.</p> <!--#include virtual="/server/bottom-notes.html" --> <p class="unprintable">Updated: <!-- timestamp start --> $Date: 2022/03/03 17:31:41 $ <!-- timestamp end --> </p> </div></div></div><!-- for class="inner", starts in the banner include --> </body> </html>