<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Javascript Archives - FODINA 4 FOSS</title>
	<atom:link href="https://fodina.de/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>https://fodina.de/tag/javascript/</link>
	<description>a treasure trove for free software, techniques, and ideas</description>
	<lastBuildDate>Fri, 11 Aug 2023 18:54:58 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
	<item>
		<title>Using JavaScript Compliantly</title>
		<link>https://fodina.de/license-compliant-javascript/</link>
					<comments>https://fodina.de/license-compliant-javascript/#respond</comments>
		
		<dc:creator><![CDATA[Karsten Reincke]]></dc:creator>
		<pubDate>Wed, 17 May 2023 08:26:57 +0000</pubDate>
				<category><![CDATA[Compliance]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Licensing]]></category>
		<guid isPermaLink="false">http://127.0.0.1/wpd.fd/?p=6204</guid>

					<description><![CDATA[<p>To speed up deliverability, the developers mostly distribute compressed JavaScript libraries that do not contain any whitespaces, line feeds, and comments. They have minified the libs. As a result, they usually contain only very rudimentary license information — at least not the license text itself. But all FOSS licenses require us to ship some compliance [&#8230;]</p>
<p>The post <a href="https://fodina.de/license-compliant-javascript/">Using JavaScript Compliantly</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>To speed up deliverability, the developers mostly distribute compressed JavaScript libraries that do not contain any whitespaces, line feeds, and comments. They have <a href="https://kinsta.com/blog/minify-javascript/">minified</a> the libs. As a result, they usually contain only very rudimentary license information — at least not the license text itself. But all FOSS licenses require us to ship some compliance artifacts with the code — especially the license text. This is the challenge for using JavaScript compliantly — in <em>bootScore</em> and elsewhere:<span id="more-6204"></span></p>



<p class="has-text-align-right"></p><div class="container"><div class="d-flex justify-content-end sample-row"><div class="col-xs"><div class="text-right">[ en | <a href="https://karsten-reincke.de/lizenzkonformes-javascript">de</a> ]</div></div></div></div>



<h2 class="wp-block-heading"><i class=" fa-regular fa-face-smile"></i> Solution</h2>



<ul class="wp-block-list">
<li>Use the <em>Bootstrap</em> JavaScript library as delivered by <em>bootScore</em></li>



<li>Use the JavaScript libraries as delivered by <em>WordPress</em></li>



<li>Create a table containing the JavaScript compliance information</li>



<li>For each JavaScript library delivered by <em>bootScore</em> or <em>WordPress</em> create a respective row in your JS table.</li>



<li>Embed this table into your <em>Open Source Compliance Page</em></li>



<li>Make this <em>Open Source Compliance Page</em> accessible by the footer of your pages</li>
</ul>



<h2 class="wp-block-heading"><i class=" fa-regular fa-lightbulb"></i> Background</h2>



<p><a href="https://github.com/bootscore/bootscore">bootSCore</a> contains some JS components. For example, its own unfolded JavaScript libraries<sup><a href="https://fodina.de/license-compliant-javascript/#footnote_0_6204" id="identifier_0_6204" class="footnote-link footnote-identifier-link" title="cf. ./bootscore/js/theme.js">1</a></sup> — implicitly licensed under the MIT license but without any explicit licensing statement — and the minified Bootstrap JavaScript library<sup><a href="https://fodina.de/license-compliant-javascript/#footnote_1_6204" id="identifier_1_6204" class="footnote-link footnote-identifier-link" title="cf. ./bootscore/js/lib/bootstrap.bundle.min.js">2</a></sup> — explicitly licensed under the MIT by a respective licensing statement. But none of them contain the license text itself. </p>



<p>Also, WordPress brings with it some own and some minified 3rd party JavaScript libraries<sup><a href="https://fodina.de/license-compliant-javascript/#footnote_2_6204" id="identifier_2_6204" class="footnote-link footnote-identifier-link" title="cf. https://codex.wordpress.org/Javascript_Reference respectively ./wp-includes/js">3</a></sup>, like the jQuery library<sup><a href="https://fodina.de/license-compliant-javascript/#footnote_3_6204" id="identifier_3_6204" class="footnote-link footnote-identifier-link" title="cf. wp-includes/js/jquery/">4</a></sup> that is licensed under the MIT and contains a respective licensing statement, but does not cover the license text itself. Regardless, of whom the site owner has got these libs — from bootScore or WordPress -, eventually it is she who has to fulfill the license requirements because it is her system that distributes the JavaScript libraries to her readers.</p>



<p>But what is actually the challenge?</p>


<div class="wp-block-image"><figure class="alignright size-medium is-resized is-style-default "><a href="https://fodina.de/wp-content/uploads/2023/05/js.jpg" data-fancybox><img decoding="async" src="https://fodina.de/wp-content/uploads/2023/05/js-300x300.jpg" alt="Riding a dead horse" width="240"></a></figure></div>



<p>Like the JavaScript libraries of <em>Bootstrap</em> and <em>jQuery</em>, most JS libraries are MIT licensed. It requires that the copyright line and the license text are distributed together with the open-source program. “The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.“<sup><a href="https://fodina.de/license-compliant-javascript/#footnote_4_6204" id="identifier_4_6204" class="footnote-link footnote-identifier-link" title="cf. MIT License">5</a></sup></p>



<p>For (L|A)GPL-licensed JavaScript libraries it is nearly the same. These licenses permit the distribution of the source code “provided that one conspicuously and appropriately publishes on each copy an appropriate copyright notice and disclaimer of warranty […] and gives any other recipients of the Program a copy of this License along with the Program”.<sup><a href="https://fodina.de/license-compliant-javascript/#footnote_5_6204" id="identifier_5_6204" class="footnote-link footnote-identifier-link" title="pars pro toto cf. GPL-2.0. Additionally, the (A)GPL requires that we license our code that uses the (A)GPL-licensed library, etc. also under the (A)GPL (copyleft effect). But that's not the point in this context.">6</a></sup></p>



<p>So, we see a contradiction between the claim of the licenses and the everyday practice. On the one side, a browser not only loads down the page text (HTML) but also the JavaScript library. This download distributes the code and hence triggers the necessity to fulfill the open-source license requirements. On the other side, usually, the compressed libraries — although as a package often offered by the authors — no longer contain the required license information: the smaller the libs, the faster the machine can display the site using that libs.</p>



<p>As site owners, we have two options to deal with this challenge. Either we subsequently (and (semi) manually) heal the packages we implicitly have taken over by using WordPress and <em>bootScore</em>. Or we use them as we’ve got them. It’s clear: Healing would imply that we redo that job whenever we update WordPress or bootScore. So, we tend to go the other way.</p>



<p>The solution is this:</p>



<p>Whenever developers decide to distribute minified JavaScript libraries, they also assume that their ‘customers’ use their work in that version. That is a reasonable assumption. So, we may derive that they implicitly permit that kind of use even if it violated the license they’ve chosen. Nevertheless, we should offer our users another option to get the required information. A substitute for bundling the license text, the copyright information, etc. with the JavaScript libraries themselves. However, we must take care only to include the minified JavaScript libraries the developers themselves have provided. In the case of the <em>Bootstrap</em>-JS-Lib in <em>bootScore</em> and the <em>Jquery</em>-JS-Lib etc. in <em>WordPress,</em> we may assume that they did so.</p>



<p>If we apply this process to our 3rd. party JS libraries, we have a strong argument for our position in case of a legal dispute — I’ve never heard of one — and we’re in good company: Even the FSF is proposing to do so.<sup><a href="https://fodina.de/license-compliant-javascript/#footnote_6_6204" id="identifier_6_6204" class="footnote-link footnote-identifier-link" title="cf. https://www.gnu.org/licenses/javascript-labels.html, https://www.gnu.org/licenses/javascript-labels-rationale.html, and https://www.iusmentis.com/computerprograms/opensourcesoftware/license-notices-web-applications">7</a></sup> And the FSF really doesn’t have a reputation for taking license compliance lightly.</p>


  <hr class="wp-block-separator has-alpha-channel-opacity">
<h5 class="wp-block-heading"><i class="fa-solid fa-link"></i> And in what way is this …</h5>
  <p class="myPageContext">… part of the overarching topic <i class="fa-brands fa-linux"></i> 
  FOSS <i class="fa-brands fa-osi"></i> Compliance? 
  For fulfilling the requirements of <a href="https://opensource.org/licenses/">FOSS licenses</a>, 
  we have to consider <a href="http://fodina.de/jniz/">specific</a> individual 
  <a href="http://fodina.de/yocto-iot-gplv3/">cases</a> as well as 
  <a href="http://fodina.de/lilypond-gpl/">side effects</a> — for 
  <a href="http://fodina.de/license-compliant-javascript/">software</a>, 
  <a href="http://fodina.de/image-databases/">pictures</a>, or documents. 
  We should unhide <a href="http://fodina.de/cc-by-trolls/">trends</a> and write 
  <a href="http://fodina.de/bosl-3-0/">guidelines</a>. Above all, however, we must 
  drive forward the <a href="http://fodina.de/tdosca/">automation of license fulfillment</a>, 
  make our <a href="http://fodina.de/oslic/">licensing knowledge</a> freely available, 
  cast it into <a href="http://fodina.de/oscad/">smaller tools</a>, and 
  <a href="http://fodina.de/oscake/">bring it into larger systems</a>: Because FOSS 
  thrives on freedom through license fulfillment, large and small. 
  That’s what also this article is about.</p>
  <hr class="wp-block-separator has-alpha-channel-opacity">
<ol class="footnotes"><li id="footnote_0_6204" class="footnote">cf. <code>./bootscore/js/theme.js</code></li><li id="footnote_1_6204" class="footnote">cf. <code>./bootscore/js/lib/bootstrap.bundle.min.js</code></li><li id="footnote_2_6204" class="footnote">cf. <a href="https://codex.wordpress.org/Javascript_Reference">https://codex.wordpress.org/Javascript_Reference</a> respectively <code>./wp-includes/js</code></li><li id="footnote_3_6204" class="footnote">cf. <code>wp-includes/js/jquery/</code></li><li id="footnote_4_6204" class="footnote">cf. <a href="https://opensource.org/license/mit/">MIT License</a></li><li id="footnote_5_6204" class="footnote">pars pro toto cf. <a href="https://opensource.org/license/gpl-2-0/">GPL‑2.0</a>. Additionally, the (A)GPL requires that we license our code that uses the (A)GPL-licensed library, etc. also under the (A)GPL (copyleft effect). But that’s not the point in this context.</li><li id="footnote_6_6204" class="footnote">cf. <a href="https://www.gnu.org/licenses/javascript-labels.html">https://www.gnu.org/licenses/javascript-labels.html</a>, <a href="https://www.gnu.org/licenses/javascript-labels-rationale.html">https://www.gnu.org/licenses/javascript-labels-rationale.html</a>, and <a href="https://www.iusmentis.com/computerprograms/opensourcesoftware/license-notices-web-applications">https://www.iusmentis.com/computerprograms/opensourcesoftware/license-notices-web-applications</a></li></ol><p>The post <a href="https://fodina.de/license-compliant-javascript/">Using JavaScript Compliantly</a> appeared first on <a href="https://fodina.de">FODINA 4 FOSS</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://fodina.de/license-compliant-javascript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
