When Richard Stallman says "Non free JavaScript" what does he mean?

The renowned programmer and Free Software activist Richard Stallman, says in his website (see "What’s bad about … " section) in regard to several websites that they require the user to run “non free JavaScript”.

In general, JavaScript code just like CSS code is an asset that can be viewed fully by a web browser. For any webpage, one can see all JavaScript or CSS for a webpage in the DOM and/or in the developer tool under “Sources” tab and can change or manipulate both JavaScript and CSS freely without effecting any other person, so what does Stallman means exactly?

Perhaps he means to a situation where the website’s terms of use “forbid” changing the website’s behavior and/or style with JavaScript, but I am not sure if that’s what he means. If he means that then he should also complain about CSS so that users are required to run non free frontend and are even not allowed to do something like display: none in the developer tool according to such terms of use.

This is just someone being a “rebel” and bypassing a paywall. Ignorant IMHO - if you don’t want to pay for someone else’s work, that’s fine. But don’t steal from them by bypassing the content and sharing it with others.

1 Like

That site hurts my eyes.


See here: https://www.gnu.org/philosophy/javascript-trap.html

An excerpt:

Part of the meaning of free software is that users have access to the program’s source code (its plan). The source code of a program means the preferred form for programmers to modify—including helpful spacing, explanatory remarks, and meaningful names. Compacted code is a bogus, useless substitute for source code; the real source code of these programs is not available to the users, so users cannot understand it; therefore the programs are nonfree.

By “compacted code” he means minified code.

1 Like

I assume that means proprietary. Is there anything anywhere that indicates it means anything else?

Yes. The text I posted above.

Stallman mentions that some websites employ methods to “compact” their JavaScript, making it difficult for users to understand the code. I took this to mean minify, but it could, I guess, also be taken to mean obfuscate.

Anyway, since JavaScript isn’t compiled and must be sent in its original form, these minification/obfuscation strategies make the code more-or-less unreadable. This contradicts the principles of open source software, leading Stallman to label the JavaScript as “non free” and advise individuals who prefer using only open source software to avoid these websites.

How can one obfuscate JavaScript code more than just minifying it?
I mean, if it’s more obfuscation than mere minify, the JavaScript will become “nonsensical” and the web browser won’t be able to process it, am I wrong?


Normal code, nicely formatted:

function isEven(number) {
    if (number % 2 === 0) {
        console.log(number + ' is even');
    } else {
        console.log(number + ' is odd');


Minified version of the same:

const e=n=>console.log(n%2===0?`${n} is even`:`${n} is odd`);e(10);

And obfuscated:

var _0x23bf=['log','%20is%20odd','%20is%20even'];(function(_0x4bd822,_0x2e8f55){var _0x5e5c03=function(_0x1d68f6){while(--_0x1d68f6){_0x4bd822['push'](_0x4bd822['shift']());}};_0x5e5c03(++_0x2e8f55);}(_0x23bf,0x1b3));var _0x4b5f=function(_0x2d8f05,_0x4e462b){_0x2d8f05=_0x2d8f05-0x0;var _0x5a5f3b=_0x23bf[_0x2d8f05];return _0x5a5f3b;};function isEven(_0x4e08d5){console[_0x4b5f('0x0')](_0x4e08d5%0x2===0x0?_0x4e08d5+_0x4b5f('0x2'):_0x4e08d5+_0x4b5f('0x1'));}isEven(0xa);

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.