The need for machine-readable licenses ------------------------------------------ For a program that I rarely change on my computer, it is fine that the license be written in a place where a program can't automatically check the license, since I need to review the license rarely.
On the web, it is easy and common to change JavaScript, and I can't practically review the license every time I reload a webpage. Thus it is important to specify the license in a way we can check automatically. Implementation of machine-readable licenses ------------------------------------------ The LibreJS format looks easy to me. I think it is reasonable to require sites to follow this to achieve higher grades in ethical hosting criteria. https://www.gnu.org/software/librejs/manual/html_node/Setting-Your-JavaScript-Free.html#License-tags It is common these days that all JavaScript for a page is compiled in a single file. It should be easy to add a step after compilation that adds the appropriate comment before and after the compilation result. On an authoritative list of free JavaScript ------------------------------------------ Another common practice is to link to popular libraries on other peoples' servers. For these cases it would work, for example, to maintain a list of hashes of freely licensed libraries that don't follow LibreJS's format, such as jQuery (https://code.jquery.com/jquery-3.7.1.min.js). Is this what you meant by maintaining a list of free JavaScript libraries? While a list would work in that case, I think it should also be easy to require that the library just have the LibreJS license annotation. Is it common that websites are free software but fail LibreJS checks only because they use popular libraries like jQuery that don't annotate the license in LibreJS's format? If this is the case, perhaps we could evaluate JavaScript libraries for compliance with the format and submit patches for adding the annotation.