Stallman looks to fight JavaScript trap

24.03.2009

A movement has developed for Web sites to communicate only through free formats and protocols, Stallman said. He presented a plan to deal with non-free JavaScript programs in Web sites, in which practical criterion is sought for determining nontrivial JavaScript programs. A program is considered nontrivial if it defines methods and either loads an external script, is loaded as one, or makes an AJAX request, under Stallman's proposal.

Stallman also offered a convention by which nontrivial JavaScript programs in a Web page can state the URL where source is located and can state its license using stylized comments. Also, free browsers need to be changed to support "freedom" for users of pages with JavaScript.

"First of all, browsers should be able to tell the user about nontrivial non-free JavaScript programs rather than running them. Perhaps could be adapted to do this," Stallman said. NoScript blocks scripts form executing on non-trusted Web pages.

Stallman added browser users need a facility to specify JavaScript code to use instead of the JavaScript in a certain page.  A solution needs to be constructed that is reliable and convenient. Sites for sharing changes also are needed, he said. The GNU Project would like to recommend sites dedicated to free changes only, he said.

"These features will make it possible for a JavaScript program included in a Web page to be free in a real and practical sense. JavaScript will no longer be a particular obstacle to our freedom -- no more than C and Java are now. We will be able to reject and even replace the non-free nontrivial JavaScript programs, just as we reject and replace non-free packages that are offered for installation in the usual way. Our campaign for Web sites to free their Javascript can then begin," Stallman said.